Skip to content

Commit 6b0c1ff

Browse files
committed
demos.lite/win32-bitmap mingw compatibility
1 parent ccc93c2 commit 6b0c1ff

File tree

4 files changed

+39
-17
lines changed

4 files changed

+39
-17
lines changed

demos.lite/win32-bitmap/plain-win.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,14 @@ LRESULT window::handle_notification(LPSCITER_CALLBACK_NOTIFICATION pnm)
4444
InvalidateRect(hwnd, &((SCN_INVALIDATE_RECT*)pnm)->invalidRect,FALSE);
4545
return 0;
4646
}
47-
return __super::handle_notification(pnm);
47+
return super::handle_notification(pnm);
4848
}
4949

5050
LRESULT window::on_load_data(LPSCN_LOAD_DATA nm)
5151
{
5252
sciter::debug_output::instance()->printf("%ws\n", nm->uri);
5353

54-
return __super::on_load_data(nm);
55-
}
56-
57-
bool window::handle_scripting_call(HELEMENT he, SCRIPTING_METHOD_PARAMS& params)
58-
{
59-
sciter::debug_output::instance()->printf("he %p call '%s'\n", he, params.name);
60-
return __super::handle_scripting_call(he, params);
54+
return super::on_load_data(nm);
6155
}
6256

6357
window::window()
@@ -267,8 +261,8 @@ LRESULT CALLBACK window::wnd_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
267261
if (!self->loaded)
268262
break;
269263

270-
static int pcnt = 0;
271-
sciter::debug_output::instance()->printf("print %d\n",++pcnt);
264+
//static int pcnt = 0;
265+
//sciter::debug_output::instance()->printf("print %d\n",++pcnt);
272266

273267
auto on_bitmap = [](LPCBYTE rgba, INT x, INT y, UINT width, UINT height, LPVOID param)
274268
{

demos.lite/win32-bitmap/plain-win.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern HINSTANCE ghInstance;
1010

1111
class window :
1212
public sciter::host<window>,
13-
public sciter::event_handler
13+
public sciter::event_handler_raw
1414
{
1515
HWND hwnd;
1616
bool loaded;
@@ -20,14 +20,16 @@ class window :
2020
HBITMAP memBm;
2121
SIZE memSize;
2222

23+
typedef sciter::host<window> super;
24+
2325
public:
2426
// notification_handler traits:
2527
HWINDOW get_hwnd() const { return (HWINDOW)this; }
2628
HINSTANCE get_resource_instance() const { return ghInstance; }
2729
LRESULT handle_notification(LPSCITER_CALLBACK_NOTIFICATION pnm);
2830

2931
virtual LRESULT on_load_data(LPSCN_LOAD_DATA pnmld) override;
30-
virtual bool handle_scripting_call(HELEMENT he, SCRIPTING_METHOD_PARAMS& params) override;
32+
//virtual bool handle_scripting_call(HELEMENT he, SCRIPTING_METHOD_PARAMS& params) override;
3133

3234
/* sciter::request / LOAD_MYSELF testing */
3335
/*LRESULT on_load_data(LPSCN_LOAD_DATA pnmld) {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.1082
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32-bitmap", "win32-bitmap.vcxproj", "{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Debug|x64.ActiveCfg = Debug|x64
17+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Debug|x64.Build.0 = Debug|x64
18+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Debug|x86.ActiveCfg = Debug|Win32
19+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Debug|x86.Build.0 = Debug|Win32
20+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Release|x64.ActiveCfg = Release|x64
21+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Release|x64.Build.0 = Release|x64
22+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Release|x86.ActiveCfg = Release|Win32
23+
{5EC523D3-A9A1-4B2D-BBE0-400E0FBCE256}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {26C8D9A0-9D77-416C-B224-B0501F18C2A6}
30+
EndGlobalSection
31+
EndGlobal

demos.lite/win32-bitmap/win32-bitmap.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@
166166
<ItemGroup>
167167
<ClInclude Include="plain-win.h" />
168168
</ItemGroup>
169-
<ItemGroup>
170-
<ProjectReference Include="..\..\..\build.windows\sciter.lite.vcxproj">
171-
<Project>{2ba127a5-9756-a09a-204b-9a718cff969e}</Project>
172-
</ProjectReference>
173-
</ItemGroup>
174169
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
175170
<ImportGroup Label="ExtensionTargets">
176171
</ImportGroup>

0 commit comments

Comments
 (0)