tdelficon.h
00001 #include <tdelibs_export.h> 00002 00003 #include <stdint.h> 00004 #include <cstdlib> 00005 00006 #include <tqdict.h> 00007 #include <tqvalidator.h> 00008 #include <tqcstring.h> 00009 #include <tqfile.h> 00010 #include <tqdatetime.h> 00011 00012 extern "C" { 00013 #include <libr-icons.h> 00014 00015 // BEGIN HACK 00016 // libr does not export these structures and defines, 00017 // but we need access to them to make the UI behave sanely 00018 // Keep them in sync with libr and all should be OK 00019 00020 // Valid for libr version 0.6.0 00021 // See libr detection code in ConfigureChecks.cmake 00022 00023 typedef uint32_t ID8; 00024 typedef uint16_t ID4; 00025 typedef struct {uint64_t p:48;} __attribute__((__packed__)) ID12; 00026 00027 typedef struct { 00028 ID8 g1; 00029 ID4 g2; 00030 ID4 g3; 00031 ID4 g4; 00032 ID12 g5; 00033 } __attribute__((__packed__)) UUID; 00034 00035 typedef struct { 00036 char *name; 00037 size_t offset; 00038 size_t entry_size; 00039 libr_icontype_t type; 00040 unsigned int icon_size; 00041 } iconentry; 00042 00043 typedef struct{ 00044 size_t size; 00045 char *buffer; 00046 iconentry entry; 00047 } iconlist; 00048 00049 #define ICON_SECTION ".icon" 00050 // END HACK 00051 } 00052 00053 TDEIO_EXPORT int get_iconlist(libr_file *file_handle, iconlist *icons); 00054 TDEIO_EXPORT iconentry *get_nexticon(iconlist *icons, iconentry *last_entry); 00055 TDEIO_EXPORT TQString elf_get_resource(libr_file *handle, char *section_name);