File: WOQuickTime.m

package info (click to toggle)
sope 5.12.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,588 kB
  • sloc: objc: 169,223; sh: 3,823; ansic: 3,409; javascript: 446; python: 318; makefile: 185
file content (154 lines) | stat: -rw-r--r-- 4,740 bytes parent folder | download | duplicates (10)
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
/*
  Copyright (C) 2000-2005 SKYRIX Software AG

  This file is part of SOPE.

  SOPE is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.

  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with SOPE; see the file COPYING.  If not, write to the
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.
*/

#include <NGObjWeb/WOHTMLDynamicElement.h>
#include "WOElement+private.h"
#include <NGObjWeb/WOApplication.h>
#include <NGObjWeb/WOResourceManager.h>
#include "decommon.h"

/*
  A QuickTime movie, picture, ...
  
  The HTML tag attributes are described at:
    http://www.apple.com/quicktime/authoring/embed2.html
*/

@interface WOQuickTime : WOHTMLDynamicElement
{
  // WODynamicElement: extraAttributes
  // WODynamicElement: otherTagString
@protected
  WOElement     *template;
  WOAssociation *filename;
  WOAssociation *framework;
  WOAssociation *src;

  WOAssociation *action;
  WOAssociation *href;
  WOAssociation *pageName;
  WOAssociation *prefixHost;
  
  WOAssociation *width;
  WOAssociation *height;
  WOAssociation *pluginsPage;
  WOAssociation *hotspotList;
  WOAssociation *selection;
  WOAssociation *bgcolor;
  WOAssociation *target;
  WOAssociation *volume;
  WOAssociation *pan;
  WOAssociation *tilt;
  WOAssociation *fov;
  WOAssociation *node;
  WOAssociation *correction;
  WOAssociation *cache;
  WOAssociation *autoplay;
  WOAssociation *hidden;
  WOAssociation *playEveryFrame;
  WOAssociation *controller;
}

@end /* WOQuickTime */

@interface WODynamicElement(UsedPrivates)
- (id)_initWithName:(NSString *)_name
  associations:(NSDictionary *)_config
  template:(WOElement *)_t;
@end

@implementation WOQuickTime

- (id)initWithName:(NSString *)_name
  associations:(NSDictionary *)_config
  template:(WOElement *)_t
{
  if ((self = [super _initWithName:_name associations:_config template:_t])) {
    self->template = [_t retain];
    
    self->filename       = OWGetProperty(_config, @"filename");
    self->framework      = OWGetProperty(_config, @"framework");
    self->src            = OWGetProperty(_config, @"src");

    self->action         = OWGetProperty(_config, @"action");
    self->href           = OWGetProperty(_config, @"href");
    self->pageName       = OWGetProperty(_config, @"pageName");
    self->prefixHost     = OWGetProperty(_config, @"prefixHost");
  
    self->width          = OWGetProperty(_config, @"width");
    self->height         = OWGetProperty(_config, @"height");
    self->pluginsPage    = OWGetProperty(_config, @"pluginsPage");
    self->hotspotList    = OWGetProperty(_config, @"hotspotList");
    self->selection      = OWGetProperty(_config, @"selection");
    self->bgcolor        = OWGetProperty(_config, @"bgcolor");
    self->target         = OWGetProperty(_config, @"target");
    self->volume         = OWGetProperty(_config, @"volume");
    self->pan            = OWGetProperty(_config, @"pan");
    self->tilt           = OWGetProperty(_config, @"tilt");
    self->fov            = OWGetProperty(_config, @"fov");
    self->node           = OWGetProperty(_config, @"node");
    self->correction     = OWGetProperty(_config, @"correction");
    self->cache          = OWGetProperty(_config, @"cache");
    self->autoplay       = OWGetProperty(_config, @"autoplay");
    self->hidden         = OWGetProperty(_config, @"hidden");
    self->playEveryFrame = OWGetProperty(_config, @"playEveryFrame");
    self->controller     = OWGetProperty(_config, @"controller");
  }
  return self;
}

- (void)dealloc {
  RELEASE(self->template);
  RELEASE(self->filename);
  RELEASE(self->framework);
  RELEASE(self->src);
  RELEASE(self->action);
  RELEASE(self->href);
  RELEASE(self->pageName);
  RELEASE(self->prefixHost);
  RELEASE(self->width);
  RELEASE(self->height);
  RELEASE(self->pluginsPage);
  RELEASE(self->hotspotList);
  RELEASE(self->selection);
  RELEASE(self->bgcolor);
  RELEASE(self->target);
  RELEASE(self->volume);
  RELEASE(self->pan);
  RELEASE(self->tilt);
  RELEASE(self->fov);
  RELEASE(self->node);
  RELEASE(self->correction);
  RELEASE(self->cache);
  RELEASE(self->autoplay);
  RELEASE(self->hidden);
  RELEASE(self->playEveryFrame);
  RELEASE(self->controller);
  [super dealloc];
}

/* event handling */

/* HTML generation */

/* description */

@end