File: sixel.xml

package info (click to toggle)
libsixel 1.10.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,496 kB
  • sloc: ansic: 23,873; cpp: 1,227; python: 497; sh: 303; xml: 271; makefile: 50; ruby: 31; perl: 26
file content (113 lines) | stat: -rw-r--r-- 3,648 bytes parent folder | download | duplicates (5)
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
<?xml version="1.0" encoding="UTF-8"?>
<extension name="sixel" version="1.0.0">

  <summary>PHP interface to libsixel</summary>
  <description>
    A PHP interface to libsixel.
    libsixel is a lightweight, fast implementation of DEC SIXEL graphics codec.
  </description>

  <maintainers>
    <maintainer>
      <user>saitoha</user>
      <name>Hayaki Saito</name>
      <email>saitoha@me.com</email>
      <role>developer</role>
    </maintainer>
  </maintainers>

  <license>MIT</license>

  <release>
    <version>0.0.2</version>
    <state>alpha</state>
    <date>2015-08-30</date>
    <notes>
        Alpha version.
    </notes>
  </release>

  <changelog>
  </changelog>

  <deps language="c" platform="all">
    <with name="libsixel" mode="pkg-config" version="1.5">
      <header name="sixel.h"/>
    </with>
  </deps>

  <class name="SixelEncoder">

    <function name="__construct" access="public">
      <proto>object __construct()</proto>
      <code><?data
        SIXELSTATUS status;
        sixel_encoder_t *encoder;
        zval *value;
        status = sixel_encoder_new(&encoder, NULL);
        if (SIXEL_FAILED(status)) {
#if 0
            zend_throw_exception_ex(zend_exception_get_default(), 1,
                                    "sixel_encoder_new() failed: %s (%s:%d)",
                                    sixel_helper_format_error(status),
                                    __FILE__, __LINE__);
#endif
        } else {
            value = emalloc(sizeof(zval));
            ZVAL_RESOURCE(value, (long)encoder);
            zend_update_property(_this_ce, getThis(),
                                 "encoder", sizeof("encoder") - 1, value);
        }
      ?></code>
    </function>

    <function name="__destruct" access="public">
      <proto>object __destruct()</proto>
      <code><?data
        zval *encoder;
        encoder = zend_read_property(_this_ce, getThis(),
                                     "encoder", sizeof("encoder") - 1, 1);
        sixel_encoder_unref((sixel_encoder_t *)Z_RESVAL_P(encoder));
        efree(encoder);
      ?></code>
    </function>

    <function name="setopt" access="public">
      <proto>void setopt(string opt[, string arg])</proto>
      <code><?data
        SIXELSTATUS status;
        zval *encoder;
        encoder = zend_read_property(_this_ce, getThis(),
                                     "encoder", sizeof("encoder") - 1, 1);
        status = sixel_encoder_setopt((sixel_encoder_t *)Z_RESVAL_P(encoder), *opt, arg);
#if 0
        if (SIXEL_FAILED(status) {
            zend_throw_exception_ex(zend_exception_get_default(), 1,
                                    "sixel_encoder_encode() failed: %s (%s:%d)",
                                    sixel_helper_format_error(status),
                                    __FILE__, __LINE__);
        }
#endif
      ?></code>
    </function>

    <function name="encode" access="public">
      <proto>void encode(string filename)</proto>
      <code><?data
        SIXELSTATUS status;
        zval *encoder;
        encoder = zend_read_property(_this_ce, getThis(),
                                     "encoder", sizeof("encoder") - 1, 1);
        status = sixel_encoder_encode((sixel_encoder_t *)Z_RESVAL_P(encoder), filename);
#if 0
        if (SIXEL_FAILED(status) {
            zend_throw_exception_ex(zend_exception_get_default(), 1,
                                    "sixel_encoder_encode() failed: %s (%s:%d)",
                                    sixel_helper_format_error(status),
                                    __FILE__, __LINE__);
        }
#endif
      ?></code>
    </function>
  </class>
</extension>