source: branches/v2.9/mediafolder/prog_tutorial/newmethods.inc

Last change on this file was 27, checked in by Lewis Rosenthal, 5 years ago

EN help and resource updates by Alfredo Fernández Díaz.

File size: 11.0 KB
Line 
1.******************************************************
2
3:h2 res=1010
4width=30%
5.cwGetFileSystemObject
6:link reftype=hd res=1011
7auto dependent group=2.
8:p.
9:link reftype=hd res=1011.Syntax:elink.
10.br
11:link reftype=hd res=1013 dependent.Returns:elink.
12.br
13:link reftype=hd res=1014 dependent.Remarks:elink.
14.*.br
15.*:link reftype=hd res=315.Usage:elink.
16.*.br
17.*:link reftype=hd res=416 dependent.Example:elink.
18
19:h2 res=1011
20x=30%
21width=70%
22hide
23group=2
24.cwGetFileSystemObject - Syntax
25:xmp.
26/* Get the file system object a shadow links to */
27
28mediaFolder /* Pointer to a media folder */
29theShadow /* A shadow object */
30:p.
31fsObj=MFldrCallFunc("cwGetFileSystemObject",
32 mediaFolder, theShadow);
33:exmp.
34
35
36:h2 res=1013
37x=30%
38width=70% height=35%
39group=3
40hide
41.cwGetFileSystemObject - Return value
42:p.
43:hp2.fsObj:ehp2. numeric
44:p.
45The return value is a pointer to the file system object the shadow
46:hp2.theShadow:ehp2. links to. If the link is broken 0 is returned.
47
48
49:h2 res=1014
50x=30%
51width=70%
52hide
53group=2
54.cwGetFileSystemObject - Remarks
55:p.
56This method is a member of the media folder therefore an object pointer to
57a media folder must be provided.
58:p.
59The method was introduced by the CWProgFolder class which is a parent class
60for several new folder classes. So you may also use a pointer to any other
61subclass of CWProgFolder. Some of these subclasses are listed below.
62
63:ul.
64:li.CWAudioFolder
65:li.CWDataFolder
66:li.CWMediaFolder
67:eul.
68
69
70
71.******************************************************
72:h2 res=1040
73width=30%
74.cwPauseAudioFile
75:link reftype=hd res=1041
76auto dependent group=2.
77:p.
78:link reftype=hd res=1041.Syntax:elink.
79.br
80:link reftype=hd res=1043 dependent.Returns:elink.
81.br
82:link reftype=hd res=1044 dependent.Remarks:elink.
83.*.br
84.*:link reftype=hd res=315.Usage:elink.
85.*.br
86.*:link reftype=hd res=416 dependent.Example:elink.
87
88:h2 res=1041
89x=30%
90width=70%
91hide
92group=2
93.cwPauseAudioFile - Syntax
94:xmp.
95/* This method pauses playing */
96
97mediaFolder /* Pointer to the media folder */
98frameHandle /* Handle of the folder frame */
99:p.
100rc=MFldrCallFunc("cwPauseAudioFile",
101 mediaFolder, frameHandle);
102:exmp.
103
104
105:h2 res=1043
106x=30%
107width=70% height=35%
108group=3
109hide
110.cwPauseAudioFile - Return value
111:p.
112:hp2.rc:ehp2. numeric
113:p.
114
115
116:h2 res=1044
117x=30%
118width=70%
119hide
120group=2
121.cwPauseAudioFile - Remarks
122:p.
123The frame handle of the media folder is given to the script as a parameter
124when started.
125
126.******************************************************
127:h2 res=1050
128width=30%
129.cwPlayAudioFile
130:link reftype=hd res=1051
131auto dependent group=2.
132:p.
133:link reftype=hd res=1051.Syntax:elink.
134.br
135:link reftype=hd res=1053 dependent.Returns:elink.
136.br
137:link reftype=hd res=1054 dependent.Remarks:elink.
138.*.br
139.*:link reftype=hd res=315.Usage:elink.
140.*.br
141.*:link reftype=hd res=416 dependent.Example:elink.
142
143:h2 res=1051
144x=30%
145width=70%
146hide
147group=2
148.cwPlayAudioFile - Syntax
149:xmp.
150/* This method starts playing the contents
151 of the media folder */
152
153mediaFolder /* Pointer to the media folder */
154frameHandle /* Handle of the folder frame */
155flag /* Flag specifying which track to start */
156:p.
157rc=MFldrCallFunc("cwPlayAudioFile",
158 mediaFolder, frameHandle, flag);
159:exmp.
160
161:h2 res=1053
162x=30%
163width=70% height=35%
164group=3
165hide
166.cwPlayAudioFile - Return value
167:p.
168:hp2.rc:ehp2. numeric
169:p.
170
171
172:h2 res=1054
173x=30%
174width=70%
175hide
176group=2
177.cwPlayAudioFile - Remarks
178:p.
179The frame handle of the media folder is given to the script as a parameter
180when started. The flag parameter may have one of the following values.
181
182:ul.
183:li.PLAY_FIRST 1
184.br
185Start the first audio track in the media folder. If any track is selected
186start with the first selected track.
187:li.PLAY_NEXT 2
188.br
189Play the next track.
190:li.PLAY_PREV 3
191.br
192Play previous track.
193:eul.
194
195
196.******************************************************
197:h2 res=1060
198width=30%
199.cwQueryCurrentlyPlayingObject
200:link reftype=hd res=1061
201auto dependent group=2.
202:p.
203:link reftype=hd res=1061.Syntax:elink.
204.br
205:link reftype=hd res=1063 dependent.Returns:elink.
206.*.br
207.*:link reftype=hd res=1054 dependent.Remarks:elink.
208.*.br
209.*:link reftype=hd res=315.Usage:elink.
210.*.br
211.*:link reftype=hd res=416 dependent.Example:elink.
212
213:h2 res=1061
214x=30%
215width=70%
216hide
217group=2
218.cwQueryCurrentlyPlayingObject - Syntax
219:xmp.
220/* This method queries the pointer to the
221 currently playing object */
222
223mediaFolder /* Pointer to the media folder */
224:p.
225rc=MFldrCallFunc("cwQueryCurrentlyPlayingObject",
226 mediaFolder);
227:exmp.
228
229:h2 res=1063
230x=30%
231width=70% height=35%
232group=3
233hide
234.cwQueryCurrentlyPlayingObject - Return value
235:p.
236:hp2.rc:ehp2. numeric
237:p.
238Object pointer to the currently playing object or 0 if no object is
239playing.
240
241
242
243.******************************************************
244:h2 res=1090
245width=30%
246.cwSetStatusLineText
247:link reftype=hd res=1091
248auto dependent group=2.
249:p.
250:link reftype=hd res=1091.Syntax:elink.
251.br
252:link reftype=hd res=1093 dependent.Returns:elink.
253.br
254:link reftype=hd res=1094 dependent.Remarks:elink.
255.*.br
256.*:link reftype=hd res=315.Usage:elink.
257.*.br
258.*:link reftype=hd res=416 dependent.Example:elink.
259
260:h2 res=1091
261x=30%
262width=70%
263hide
264group=2
265.cwSetStatusLineText - Syntax
266:xmp.
267/* This method sets the status line text of a media folder */
268
269mediaFolder /* Pointer to a media folder on which the method is invoked */
270theText /* Text for status line or 0 */
271:p.
272info=MFldrCallFunc("cwSetStatusLineText",
273 mediaFolder, theText);
274:exmp.
275
276:h2 res=1093
277x=30%
278width=70% height=35%
279group=3
280hide
281.cwSetStatusLineText - Return value
282:p.
283:hp2.info:ehp2. string
284:p.
285
286
287:h2 res=1094
288x=30%
289width=70%
290hide
291group=2
292.cwSetStatusLineText - Remarks
293:p.
294If the text parameter is 0 the folder shows its standard
295status line text.
296
297
298.******************************************************
299:h2 res=1100
300width=30%
301.cwStopAudioFile
302:link reftype=hd res=1101
303auto dependent group=2.
304:p.
305:link reftype=hd res=1101.Syntax:elink.
306.br
307:link reftype=hd res=1103 dependent.Returns:elink.
308.br
309:link reftype=hd res=1104 dependent.Remarks:elink.
310.*.br
311.*:link reftype=hd res=315.Usage:elink.
312.*.br
313.*:link reftype=hd res=416 dependent.Example:elink.
314
315:h2 res=1101
316x=30%
317width=70%
318hide
319group=2
320.cwStopAudioFile - Syntax
321:xmp.
322/* This method stops playing */
323
324mediaFolder /* Pointer to the media folder */
325frameHandle /* Handle of the folder frame */
326:p.
327rc=MFldrCallFunc("cwStopAudioFile",
328 mediaFolder, frameHandle);
329:exmp.
330
331
332:h2 res=1103
333x=30%
334width=70% height=35%
335group=3
336hide
337.cwStopAudioFile - Return value
338:p.
339:hp2.rc:ehp2. numeric
340:p.
341
342
343:h2 res=1104
344x=30%
345width=70%
346hide
347group=2
348.cwStopAudioFile - Remarks
349:p.
350The frame handle of the media folder is given to the script as a parameter
351when started.
352
353
354.******************************************************
355:h2 res=1070
356width=30%
357.cwmmQueryTrackInfo
358:link reftype=hd res=1071
359auto dependent group=2.
360:p.
361:link reftype=hd res=1071.Syntax:elink.
362.br
363:link reftype=hd res=1073 dependent.Returns:elink.
364.br
365:link reftype=hd res=1074 dependent.Remarks:elink.
366.*.br
367.*:link reftype=hd res=315.Usage:elink.
368.*.br
369.*:link reftype=hd res=416 dependent.Example:elink.
370
371:h2 res=1071
372x=30%
373width=70%
374hide
375group=2
376.cwmmQueryTrackInfo - Syntax
377:xmp.
378/* This method queries information from an
379 audio object */
380
381audioObject /* Pointer to an audio object on which the method is invoked */
382flag /* Flag specifying which info to query */
383:p.
384info=MMClsCallFunc("cwmmQueryTrackInfo",
385 audioObject, flag);
386:exmp.
387
388:h2 res=1073
389x=30%
390width=70% height=35%
391group=3
392hide
393.cwmmQueryTrackInfo - Return value
394:p.
395:hp2.info:ehp2. string
396:p.
397The requested information is returned as a string. If no information
398is available an empty string is returned.
399:p.
400If an error occurs :hp2.ERROR&colon.:ehp2. is returned.
401
402:h2 res=1074
403x=30%
404width=70%
405hide
406group=2
407.cwmmQueryTrackInfo - Remarks
408:p.
409The object must be an instance of :hp2.CWAudio:ehp2. or of one of its
410subclasses (:hp2.CWMP3:ehp2., :hp2.MMWAV:ehp2....). This method was introduced
411by :hp2.CWAudio:ehp2.. Since V0.2.5 of the classes the class names are :hp2.MMAudio:ehp2.
412:hp2.MMWAV:ehp2. etc. to be compatible with the IBM classes coming with OS/2.
413:p.
414The flag parameter may have one of the following values.
415:ul.
416:li.IDINFO_NAME 1
417.br
418Trackname
419:li.IDINFO_ARTIST 2
420.br
421Name of artist.
422:li.IDINFO_ALBUM 3
423.br
424Name of album.
425:li.IDINFO_YEAR 4
426.br
427Year from ID3 tag
428:li.IDINFO_COMMENT 5
429.br
430Comment.
431:li.IDINFO_GENRE 6
432.br
433The genre as a string.
434:li.IDINFO_PLAYTIME 7
435.br
436Play time in seconds (numeric value).
437:li.IDINFO_BPS 8
438.br
439Bits per sample (numeric value).
440:li.IDINFO_SAMPLERATE 9
441.br
442Samplerate in Hz (numeric value).
443:li.IDINFO_CHANNELS 10
444.br
445Number of channels (numeric value).
446:li.IDINFO_BITRATE 11
447.br
448Bitrate in KB per second (numeric value). This flag is only valid for instances
449of class MMMP3 and MMOGG. For other classes the return value is undefined. New
450with V0.2.7.
451:eul.
452
453
454.******************************************************
455:h2 res=1080
456width=30%
457.cwmmQueryImageInfo
458:link reftype=hd res=1081
459auto dependent group=2.
460:p.
461:link reftype=hd res=1081.Syntax:elink.
462.br
463:link reftype=hd res=1082 dependent.Parameters:elink.
464
465.br
466:link reftype=hd res=1083 dependent.Returns:elink.
467.*.br
468.*:link reftype=hd res=1084 dependent.Remarks:elink.
469.*.br
470.*:link reftype=hd res=315.Usage:elink.
471.*.br
472.*:link reftype=hd res=416 dependent.Example:elink.
473
474:h2 res=1081
475x=30%
476width=70%
477hide
478group=2
479.cwmmQueryImageInfo - Syntax
480:xmp.
481/* This method queries information from an
482 image object */
483
484imageObject /* Pointer to an image object on which the method is invoked */
485flag /* Flag specifying which info to query */
486:p.
487info=MMCallFunc("cwmmQueryTrackInfo",
488 imageObject, flag);
489:exmp.
490
491:h2 res=1083
492x=30%
493width=70% height=35%
494group=3
495hide
496.cwmmQueryImageInfo - Return value
497:p.
498:hp2.info:ehp2. string
499:p.
500The requested information is returned as a string. If no information
501is available an empty string is returned.
502:p.
503If an error occurs :hp2.ERROR&colon.:ehp2. is returned.
504
505:h2 res=1082
506x=30%
507width=70%
508hide
509group=2
510.cwmmQueryImageInfo - Parameters
511:p.
512:parml tsize=10.
513:pt.:hp2.imageObject:ehp2. (numeric)
514:pd.Object pointer of the image file.
515:pt.:hp2.flag:ehp2. (numeric)
516:pd.Determines the information to be queried.
517:parml tsize=3.
518:pt.IDINFO_WIDTH 0x0001
519:pd.The width of the image.
520:pt.IDINFO_HEIGHT 0x0002
521:pd.The height of the image.
522:pt.IDINFO_BPP 0x0003
523:pd.Number of bits per pixel.
524:pt.IDINFO_FORMAT 0x0004
525:pd.Image format.
526:eparml.
527:eparml.
528
Note: See TracBrowser for help on using the repository browser.