source: branches/v2.9/classes/c/c_image/cwtiff.c

Last change on this file was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 4.0 KB
Line 
1/*
2 * (C) Chris Wohlgemuth 2002-2004
3 *
4 */
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20/*
21 * If you need another license for your project/product (commercial,
22 * noncommercial, whatever) contact me at
23 *
24 * http://www.os2world.com/cdwriting
25 * http://www.geocities.com/SiliconValley/Sector/5785/
26 *
27 */
28/*
29 * This file was generated by the SOM Compiler and Emitter Framework.
30 * Generated using:
31 * SOM Emitter emitctm: 2.42
32 */
33
34#ifndef SOM_Module_cwtiff_Source
35#define SOM_Module_cwtiff_Source
36#endif
37#define CWTIFF_Class_Source
38#define M_CWTIFF_Class_Source
39
40#include <os2.h>
41#include "helpid.h"
42#include "cwtiff.ih"
43
44extern char chrHelpLibrary[CCHMAXPATH];
45
46HMODULE queryResModuleHandle(void);
47HMODULE queryModuleHandle(void);
48BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
49
50/*
51 * The prototype for cwtiffM_wpclsQueryInstanceType was replaced by the following prototype:
52 */
53SOM_Scope PSZ SOMLINK cwtiffM_wpclsQueryInstanceType(M_MMTIFF *somSelf)
54{
55 /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
56 M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryInstanceType");
57
58 return "TIFF";
59}
60
61/*
62 * The prototype for cwtiffM_wpclsQueryInstanceFilter was replaced by the following prototype:
63 */
64SOM_Scope PSZ SOMLINK cwtiffM_wpclsQueryInstanceFilter(M_MMTIFF *somSelf)
65{
66 /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
67 M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryInstanceFilter");
68
69 return "*.TIF";
70}
71
72/*
73 * The prototype for cwtiffM_wpclsQueryDefaultHelp was replaced by the following prototype:
74 */
75SOM_Scope BOOL SOMLINK cwtiffM_wpclsQueryDefaultHelp(M_MMTIFF *somSelf,
76 PULONG pHelpPanelId,
77 PSZ pszHelpLibrary)
78{
79 /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
80 M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryDefaultHelp");
81
82 if(pHelpPanelId)
83 *pHelpPanelId=TIFFFILE_HELP_PANEL;
84 if(pszHelpLibrary)
85 strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
86 return TRUE;
87}
88
89/*
90 * The prototype for cwtiffM_wpclsQueryTitle was replaced by the following prototype:
91 */
92SOM_Scope PSZ SOMLINK cwtiffM_wpclsQueryTitle(M_MMTIFF *somSelf)
93{
94 static char chrTitle[20]={0};
95 /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
96 M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryTitle");
97
98 if(chrTitle[0]==0)
99 if(!getMessage(chrTitle, IDSTR_TIFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
100 strcpy(chrTitle,"TIFImage.TIF");
101
102 return chrTitle;
103}
104
105/*
106 * The prototype for cwtiffM_wpclsQueryIconData was replaced by the following prototype:
107 */
108SOM_Scope ULONG SOMLINK cwtiffM_wpclsQueryIconData(M_MMTIFF *somSelf,
109 PICONINFO pIconInfo)
110{
111 HMODULE hmod;
112
113 /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
114 M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryIconData");
115
116 hmod=queryModuleHandle();
117 if(!hmod)
118 return M_MMTIFF_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
119
120 if (pIconInfo) {
121 pIconInfo->fFormat = ICON_RESOURCE;
122 pIconInfo->hmod = hmod;
123 pIconInfo->resid = ID_ICONTIFFILE;
124 } /* endif */
125
126 return ( sizeof(ICONINFO) );
127}
128
Note: See TracBrowser for help on using the repository browser.