source: trunk/Lucide/plugins/ludoc/lupixbuf.idl @ 367

Last change on this file since 367 was 367, checked in by dmik, 12 years ago

Merged bramches/kmk (r294:365) to trunk.

File size: 1.9 KB
RevLine 
[2]1#ifndef lupixbuf_idl
2#define lupixbuf_idl
3
4/*
5 *
6 *  LuPixbuf - pixel buffer class, contains pixel data
7 *             in format suitable for use with GpiDrawBits()
8 *
9 */
10
11#include <somobj.idl>
12
13
14interface LuPixbuf : SOMObject
15{
[95]16
17    /**
18     * LuPixbufInit: init routine (constructor)
19     * w: width of newly created pixbuf
20     * h: height of newly created pixbuf
21     * bpp: bytes per pixel, 3 or 4
22     **/
[27]23    void LuPixbufInit( inout somInitCtrl ctrl, in long w, in long h, in short bpp );
[95]24   
25    /**
26     * getWidth
27     *
28     * Returns pixbuf width
29     **/
[2]30    long getWidth();
[95]31   
32    /**
33     * getHeight
34     *
35     * Returns pixbuf height
36     **/
[2]37    long getHeight();
[95]38   
39    /**
40     * getBpp
41     *
42     * Returns number of bytes per pixel (3 or 4)
43     **/
[27]44    short getBpp();
[95]45   
46    /**
47     * getRowSize
48     *
49     * Returns size of one row, in bytes
50     *
51     * Note: (getWidth()*getBpp()) MAY NOT EQUAL getRowSize() as
52     *       row size may be padded to be four-bytes aligned
53     **/
[2]54    long getRowSize();
[95]55   
56    /**
57     * getDataLen
58     *
59     * Returns length of pixbuf data in bytes (getRowSize()*getHeight())
60     **/
[2]61    long getDataLen();
[95]62   
63    /**
64     * getDataPtr
65     *
66     * Returns pointer to pixbuf data
67     **/
[2]68    void *getDataPtr();
[95]69   
70    /**
71     * putAt
72     *
73     * Puts a data of another pixbuf (p) to specified position (x, y)
74     **/
[2]75    void putAt( in LuPixbuf p, in long x, in long y );
76
77
78#ifdef __SOMIDL__
79
80    implementation
81    {
[27]82        releaseorder: LuPixbufInit, getWidth, getHeight, getBpp, getRowSize,
[2]83                                      getDataLen, getDataPtr, putAt;
84   
85        long width;
86        long height;
87        short bpp;
88        long dlen;
89        long rowsize;
90        void *data;
91       
92        LuPixbufInit: init;
93        somDestruct: override;
94    };
95   
96#endif // __SOMIDL__
97
98};
99
100#endif // lupixbuf_idl
Note: See TracBrowser for help on using the repository browser.