Skip to content

Commit

Permalink
Revert to master version of shoes/*
Browse files Browse the repository at this point in the history
  • Loading branch information
wasnotrice committed Mar 23, 2012
1 parent 8be181f commit e76e20e
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 406 deletions.
17 changes: 3 additions & 14 deletions shoes/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,18 +692,7 @@ shoes_canvas_border(int argc, VALUE *argv, VALUE self)
VALUE
shoes_canvas_video(int argc, VALUE *argv, VALUE self)
{
#ifdef VIDEO
VALUE video;
rb_arg_list args;
SETUP();

rb_parse_args(argc, argv, "s|h", &args);
video = shoes_video_new(cVideo, args.a[0], args.a[1], self);
shoes_add_ele(canvas, video);
return video;
#else
rb_raise(eNotImpl, "no video support");
#endif
}

VALUE
Expand Down Expand Up @@ -807,9 +796,9 @@ shoes_canvas_shape(int argc, VALUE *argv, VALUE self)
#else
cairo_path_extents(canvas->shape, &x1, &y1, &x2, &y2);
#endif
x = x2 - x1;
x = ROUND(x2 - x1);
ATTRSET(attr, width, INT2NUM(x));
x = y2 - y1;
x = ROUND(y2 - y1);
ATTRSET(attr, height, INT2NUM(x));
line = cairo_copy_path(canvas->shape);
canvas->shape = shape;
Expand Down Expand Up @@ -1759,7 +1748,7 @@ shoes_canvas_send_start(VALUE self)
int i;
canvas->stage = CANVAS_STARTED;

for (i = RARRAY_LEN(canvas->contents) - 1; i >= 0; i--)
for (i = (int)RARRAY_LEN(canvas->contents) - 1; i >= 0; i--)
{
VALUE ele = rb_ary_entry(canvas->contents, i);
if (rb_obj_is_kind_of(ele, cCanvas) && shoes_canvas_inherits(ele, canvas))
Expand Down
40 changes: 1 addition & 39 deletions shoes/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ typedef struct {
PangoLayout *layout;
PangoAttrList *pattr;
GString *text;
gsize len;
guint len;
char cached, hover;
shoes_transform *st;
} shoes_textblock;
Expand Down Expand Up @@ -222,31 +222,7 @@ typedef struct {
char hover;
} shoes_image;

#ifdef VIDEO
#define SHOES_VIDEO 1
//
// video struct
//
typedef struct {
VALUE parent;
VALUE attr;
shoes_place place;
SHOES_CONTROL_REF ref;
libvlc_exception_t excp;
#ifdef VIDEO
#ifdef VLC_0_8
libvlc_instance_t *vlc;
#else
libvlc_media_player_t *vlc;
#endif
#endif
int init;
VALUE path;
SHOES_SLOT_OS *slot;
} shoes_video;
#else
#define SHOES_VIDEO 0
#endif

//
// pattern struct
Expand Down Expand Up @@ -575,20 +551,6 @@ VALUE shoes_effect_new(ID, VALUE, VALUE);
VALUE shoes_effect_alloc(VALUE);
VALUE shoes_effect_draw(VALUE, VALUE, VALUE);

#ifdef VIDEO
void shoes_video_mark(shoes_video *);
VALUE shoes_video_new(VALUE, VALUE, VALUE, VALUE);
VALUE shoes_video_alloc(VALUE);
VALUE shoes_video_draw(VALUE, VALUE, VALUE);
VALUE shoes_video_show(VALUE);
VALUE shoes_video_hide(VALUE);
VALUE shoes_video_get_top(VALUE);
VALUE shoes_video_get_left(VALUE);
VALUE shoes_video_get_width(VALUE);
VALUE shoes_video_get_height(VALUE);
VALUE shoes_video_remove(VALUE);
#endif

VALUE shoes_pattern_self(VALUE);
VALUE shoes_pattern_method(VALUE, VALUE);
VALUE shoes_pattern_args(int, VALUE *, VALUE);
Expand Down
Loading

0 comments on commit e76e20e

Please sign in to comment.