source: trunk/classes/c/c_image/cwmmotion.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: 5.4 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_cwmmotion_Source
35#define SOM_Module_cwmmotion_Source
36#endif
37#define CWMMotion_Class_Source
38#define M_CWMMotion_Class_Source
39
40#include <os2.h>
41#include "helpid.h"
42#include "cwmmotion.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/*
52 * SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryInstanceType(M_CWMMotion *somSelf)
53 */
54
55/*
56 * The prototype for cwmmotionM_wpclsQueryInstanceType was replaced by the following prototype:
57 */
58SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryInstanceType(M_MMMMotion *somSelf)
59{
60 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
61 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryInstanceType");
62
63 return "MMotion Image";
64}
65
66
67/*
68 * SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_CWMMotion *somSelf)
69 */
70
71/*
72 * The prototype for cwmmotionM_wpclsQueryInstanceFilter was replaced by the following prototype:
73 */
74SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_MMMMotion *somSelf)
75{
76 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
77 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryInstanceFilter");
78
79 return "*.VID";
80}
81
82
83/*
84 * SOM_Scope BOOL SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_CWMMotion *somSelf,
85 * PULONG pHelpPanelId,
86 * PSZ pszHelpLibrary)
87 */
88
89/*
90 * The prototype for cwmmotionM_wpclsQueryDefaultHelp was replaced by the following prototype:
91 */
92SOM_Scope BOOL SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_MMMMotion *somSelf,
93 PULONG pHelpPanelId,
94 PSZ pszHelpLibrary)
95{
96 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
97 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryDefaultHelp");
98
99 if(pHelpPanelId)
100 *pHelpPanelId=MMOTIONFILE_HELP_PANEL;
101 if(pszHelpLibrary)
102 strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
103 return TRUE;
104}
105
106
107/*
108 * SOM_Scope ULONG SOMLINK cwmmotionM_wpclsQueryStyle(M_CWMMotion *somSelf)
109 */
110
111/*
112 * The prototype for cwmmotionM_wpclsQueryStyle was replaced by the following prototype:
113 */
114SOM_Scope ULONG SOMLINK cwmmotionM_wpclsQueryStyle(M_MMMMotion *somSelf)
115{
116 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
117 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryStyle");
118
119 return (M_MMMMotion_parent_M_MMImage_wpclsQueryStyle(somSelf));
120}
121
122
123/*
124 * SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryTitle(M_CWMMotion *somSelf)
125 */
126
127/*
128 * The prototype for cwmmotionM_wpclsQueryTitle was replaced by the following prototype:
129 */
130SOM_Scope PSZ SOMLINK cwmmotionM_wpclsQueryTitle(M_MMMMotion *somSelf)
131{
132 static char chrTitle[20]={0};
133 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
134 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryTitle");
135
136 if(chrTitle[0]==0)
137 if(!getMessage(chrTitle, IDSTR_MMOTIONTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
138 strcpy(chrTitle,"VIDImage.VID");
139
140 return chrTitle;
141}
142
143
144/*
145 * SOM_Scope ULONG SOMLINK cwmmotionM_wpclsQueryIconData(M_CWMMotion *somSelf,
146 * PICONINFO pIconInfo)
147 */
148
149/*
150 * The prototype for cwmmotionM_wpclsQueryIconData was replaced by the following prototype:
151 */
152SOM_Scope ULONG SOMLINK cwmmotionM_wpclsQueryIconData(M_MMMMotion *somSelf,
153 PICONINFO pIconInfo)
154{
155 HMODULE hmod;
156
157 /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
158 M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryIconData");
159
160 hmod=queryModuleHandle();
161 if(!hmod)
162 return M_MMMMotion_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
163
164 if (pIconInfo) {
165 pIconInfo->fFormat = ICON_RESOURCE;
166 pIconInfo->hmod = hmod;
167 pIconInfo->resid = ID_ICON_IMFILE;
168 } /* endif */
169
170 return ( sizeof(ICONINFO) );
171}
172
Note: See TracBrowser for help on using the repository browser.