Permalink
Browse files

htsp: misc cleanup

  • Loading branch information...
andoma committed Aug 22, 2012
1 parent 15a0d79 commit 9bc3c3dd52efabd55e842056fcc5ef0616e5935f
@@ -17,6 +17,7 @@ multiopt($view.path,
translate($page.model.contents, void,
"album", link(_("Album"), "album.view"),
+ "tvchannels", link(_("Tvchannels"), "tvchannels.view"),
"images", link(_("Images"), "images.view")
),
select($page.model.contents == "images",
@@ -0,0 +1,41 @@
+
+widget(container_y, {
+ .spacing = 4;
+ widget(label, {
+ .caption = $args.metadata.title;
+ .ellipsize = true;
+ .sizeScale = 1.5;
+ .filterConstraintX = true;
+ shadow: true;
+ outline: true;
+ });
+
+
+ widget(list_y, {
+ &view.focused = focusedChild();
+
+ cloner($args.metadata.events.list, container_x, {
+
+ widget(label, {
+ .filterConstraintX = true;
+ .weight = 0.3;
+ .caption = strftime($self.start, "%H:%M");
+ shadow: true;
+ outline: true;
+ });
+
+ widget(label, {
+ .caption = $self.title;
+ .ellipsize = true;
+ .focusable = true;
+ .focusOnClick = true;
+ .color = select(isFocused(), 1.0, 0.6);
+ shadow: true;
+ outline: true;
+ });
+
+ });
+ });
+});
+
+
@@ -43,6 +43,7 @@ widget(keyintercept, {
"action", "action",
"info", "info",
"plugin", "plugin",
+ "tvchannel", "tvchannel",
"keymapentry", "keymapentry"
)
+ ".view";
@@ -81,13 +82,15 @@ widget(keyintercept, {
source: translate($clone.focused.type, "",
"video", "iteminfo/video.view",
"image", "iteminfo/image.view",
+ "tvchannel", "iteminfo/tvchannel.view",
"plugin", "iteminfo/plugin.view");
.args ?= $clone.focused;
});
$view.showRightPane = translate($clone.focused.type, 0,
"video", 1,
"plugin", 1,
+ "tvchannel", 1,
"image", 1
);
});
@@ -0,0 +1,29 @@
+#import "theme://common.view"
+
+widget(backdrop, {
+
+ source: "highlight.png";
+ autoRefocusable: true;
+ focusable: true;
+ focusOnClick: true;
+ onEvent(activate, navOpen($self.url, void, void, $parent.model));
+
+ alphaSelf: iir(isFocused() * 1, 8) + isHovered() * 0.1;
+
+ widget(container_x, {
+ spacing: 13;
+ widget(icon, {
+ align: left;
+ color: select(isFocused(), 1.0, 0.6);
+ source: "dataroot://resources/svg/Display.svg";
+ shadow: true;
+ });
+
+ widget(label, {
+ filterConstraintX: true;
+ TextStyleItem();
+ color: select(isFocused(), 1.0, 0.6);
+ caption: $self.metadata.title;
+ });
+ });
+});
@@ -0,0 +1,37 @@
+widget(container_z, {
+ autoRefocusable: true;
+ focusable: true;
+ width: $ui.size * 8;
+
+
+ widget(stencil, {
+ source: "theme://graphics/stencil.png";
+ widget(container_z, {
+ widget(quad, {
+ color: 0;
+ });
+
+ widget(image, {
+ align: bottom;
+ width: $ui.size * 8;
+ $clone.ready = isReady();
+ source: "thumb://" + $self.url;
+ color: isFocused() + 0.5;
+ });
+
+ widget(container_y, {
+ space(1);
+ widget(throbber, {
+ alpha: iir(!$clone.ready, 8);
+ });
+ space(1);
+ });
+ });
+ });
+
+ widget(backdrop, {
+ source: "theme://graphics/border32.png";
+ border: 16;
+ alpha: iir(isFocused(), 8) + 0.1;
+ });
+});
@@ -0,0 +1,88 @@
+#import "theme://common.view"
+
+widget(container_y, {
+
+ alpha: 1 - iir(clamp(getLayer(), 0, 1), 7) * 0.5;
+ blur: iir(clamp(getLayer(), 0, 1), 7);
+
+ PageTitle($page.model.metadata.title);
+ VerticalSeparator();
+
+ widget(dummy, {
+ height: $ui.size * 2;
+ });
+
+ widget(container_x, {
+ weight: 2;
+ });
+
+ widget(dummy, {
+ height: $ui.size * 2;
+ });
+
+ widget(fader, {
+ filterConstraintY: true;
+ weight: 1;
+ plane: [0,1,0,1];
+ alphaFallOff: 1;
+ blurFallOff: 0.2;
+ widget(mirror, {
+ alpha: 0.4;
+
+ widget(list_x, {
+ spacing: 5;
+
+ scrollThreshold: $ui.width / 10;
+
+
+ &self.focused = focusedChild();
+
+ cloner($page.model.nodes, container_z, {
+ autoRefocusable: true;
+ focusable: true;
+ width: $ui.size * 12;
+ $clone.fd = focusDistance();
+
+ widget(stencil, {
+ source: "theme://graphics/stencil.png";
+ widget(container_z, {
+ widget(quad, {
+ color: 0;
+ alpha: 0.5;
+ });
+
+ widget(image, {
+ align: bottom;
+ width: $ui.size * 8;
+ $clone.ready = isReady();
+ source: $self.metadata.icon;
+ color: isFocused() + 0.5;
+ });
+
+
+ widget(label, {
+ padding: [0,0,0,$ui.size*0.5];
+ align: bottom;
+ caption: $self.metadata.title;
+ shadow: true;
+ outline: true;
+ });
+
+ });
+ });
+
+ widget(backdrop, {
+ source: "theme://graphics/border32.png";
+ border: 16;
+ alpha: iir(isFocused(), 8) + 0.1;
+ });
+ });
+ });
+ });
+ });
+
+ widget(dummy, {
+ height: $ui.size * 4;
+ });
+});
+
View
@@ -86,7 +86,8 @@ backend_play_video(const char *url, struct media_pipe *mp,
int flags, int priority,
char *errbuf, size_t errlen,
const char *mimetype,
- const char *canonical_url)
+ const char *canonical_url,
+ video_queue_t *vq)
{
backend_t *nb = backend_canhandle(url);
@@ -98,7 +99,7 @@ backend_play_video(const char *url, struct media_pipe *mp,
mp_set_url(mp, canonical_url);
return nb->be_play_video(url, mp, flags, priority, errbuf, errlen, mimetype,
- canonical_url);
+ canonical_url, vq);
}
View
@@ -26,6 +26,7 @@ struct media_pipe;
struct navigator;
struct event;
struct image_meta;
+typedef struct video_queue video_queue_t;
typedef int (be_load_cb_t)(void *opaque, int loaded, int total);
@@ -73,7 +74,8 @@ typedef struct backend {
int flags, int priority,
char *errbuf, size_t errlen,
const char *mimetype,
- const char *canonical_url);
+ const char *canonical_url,
+ video_queue_t *vq);
struct event *(*be_play_audio)(const char *url, struct media_pipe *mp,
char *errbuf, size_t errlen, int paused,
@@ -111,7 +113,8 @@ struct event *backend_play_video(const char *url, struct media_pipe *mp,
int flags, int priority,
char *errbuf, size_t errlen,
const char *mimetype,
- const char *canonical_url)
+ const char *canonical_url,
+ video_queue_t *vq)
__attribute__ ((warn_unused_result));
@@ -183,7 +183,8 @@ be_dvd_play(const char *url, media_pipe_t *mp,
int flags, int priority,
char *errstr, size_t errlen,
const char *mimetype,
- const char *canonical_url)
+ const char *canonical_url,
+ struct video_queue *vq)
{
event_t *e;
if(strncmp(url, "dvd:", strlen("dvd:"))) {
Oops, something went wrong.

0 comments on commit 9bc3c3d

Please sign in to comment.