3e619153182cfda569e7ff3c74290df29f8ab09a
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / oliasdb / graphic_hd.h
1 /*
2  * $XConsortium: graphic_hd.h /main/5 1996/06/11 17:29:02 cde-hal $
3  * $XConsortium: graphic_hd.h /main/5 1996/06/11 17:29:02 cde-hal $
4  *
5  * Copyright (c) 1992 HAL Computer Systems International, Ltd.
6  * All rights reserved.  Unpublished -- rights reserved under
7  * the Copyright Laws of the United States.  USE OF A COPYRIGHT
8  * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
9  * OR DISCLOSURE.
10  * 
11  * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
12  * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.  USE,
13  * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
14  * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
15  * INTERNATIONAL, LTD.
16  * 
17  *                         RESTRICTED RIGHTS LEGEND
18  * Use, duplication, or disclosure by the Government is subject
19  * to the restrictions as set forth in subparagraph (c)(l)(ii)
20  * of the Rights in Technical Data and Computer Software clause
21  * at DFARS 252.227-7013.
22  *
23  *          HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
24  *                  1315 Dell Avenue
25  *                  Campbell, CA  95008
26  * 
27  */
28
29
30 #ifndef _graphic_hd_h
31 #define _graphic_hd_h 1
32
33 #include "object/tuple.h"
34 #include "object/pstring.h"
35 #include "object/compressed_pstring.h"
36 #include "oliasdb/olias_consts.h"
37 #include "api/smart_ptr.h"
38
39 /*************************************/
40 // The graphic class
41 /*************************************/
42
43 class graphic : public tuple
44 {
45
46 public:
47    graphic() : tuple(NUM_GRAPHIC_FIELDS, GRAPHIC_CODE) {};
48    virtual ~graphic() {};
49
50    MMDB_SIGNATURES(graphic);
51
52 protected:
53 };
54
55 typedef graphic* graphicPtr;
56
57 /*************************************/
58 // The graphic_smart_ptr class
59 /*************************************/
60 class graphic_smart_ptr : public smart_ptr
61 {
62 public:
63
64    graphic_smart_ptr(info_lib* lib_ptr, const char* ibase_name, const char* locator);
65    graphic_smart_ptr(info_base* ibase_ptr, const char* locator);
66    graphic_smart_ptr(info_base* ibase_ptr, const oid_t& id);
67    virtual ~graphic_smart_ptr() {};
68
69    const char* locator();
70    const char* file_name();
71    const char* version();
72
73    int type() const;
74    unsigned short coding();
75    unsigned short width();
76    unsigned short height();
77    int data_size();
78    const char* data();
79    const char* title();
80
81    unsigned int llx() ;
82    unsigned int lly() ;
83    unsigned int urx() ;
84    unsigned int ury() ;
85
86 protected:
87
88    int f_type;
89    unsigned short f_width, f_height, f_coding;
90    unsigned int f_llx, f_lly, f_urx, f_ury;
91    Boolean _converted;
92
93    Boolean _convert_to_ints();
94
95    void init ();
96
97 #ifdef C_API
98    static buffer* local_graphic_buffer_ptr;
99    friend void initialize_MMDB();
100    friend void quit_MMDB();
101 #endif
102 };
103
104
105 typedef graphic_smart_ptr* graphic_smart_ptrPtr;
106
107 #endif