mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Adding Control Panel extension; not part of build process yet
This commit is contained in:
parent
ce483ec411
commit
f23d98687d
19
cmd/winfe/cpl_name.cpp
Normal file
19
cmd/winfe/cpl_name.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape Communications Corporation.
|
||||
Portions created by Netscape are Copyright (C) 1998 Netscape Communications Corporation.
|
||||
All Rights Reserved.
|
||||
*/
|
||||
|
||||
extern const char * const module_name = "mozilla.cpl";
|
65
cmd/winfe/mkfiles32/mozcpl.mak
Normal file
65
cmd/winfe/mkfiles32/mozcpl.mak
Normal file
@ -0,0 +1,65 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
# mozcpl.mak
|
||||
#
|
||||
# This file makes moz.cpl, the Mozilla control panel extension .dll.
|
||||
|
||||
DEPTH = ..\..\..
|
||||
|
||||
!if "$(MOZ_DEBUG)"!=""
|
||||
C_OPTS_DBG = /Zi
|
||||
EXE_OPTS_DBG = /DEBUG
|
||||
!if "$(MOZ_BITS)"=="32"
|
||||
OBJDIR = $(MOZ_OUT)\x86Dbg
|
||||
!else
|
||||
OBJDIR = $(MOZ_OUT)\16x86Dbg
|
||||
!endif
|
||||
!else
|
||||
C_OPTS_DBG = /O1
|
||||
!if "$(MOZ_BITS)"=="32"
|
||||
OBJDIR = $(MOZ_OUT)\x86Rel
|
||||
!else
|
||||
OBJDIR = $(MOZ_OUT)\16x86Rel
|
||||
!endif
|
||||
!endif
|
||||
|
||||
DLL = $(OBJDIR)\mozilla.cpl
|
||||
|
||||
C_OPTS = /nologo /c /I.. /Fo$@ $(C_OPTS_DBG)
|
||||
CPP_OPTS = $(C_OPTS)
|
||||
EXE_OPTS = $(EXE_OPTS_DBG) /OUT:$@
|
||||
DLL_OPTS = $(EXE_OPTS) /DLL
|
||||
|
||||
all : dll
|
||||
|
||||
dll : $(DLL)
|
||||
|
||||
clean :
|
||||
-@erase $(DLL) 1>nul 2>&1
|
||||
-@erase $(OBJDIR)\mozcpl.* 1>nul 2>&1
|
||||
|
||||
$(DLL) : $(OBJDIR)\mozcpl.obj $(OBJDIR)\cpl_name.obj $(OBJDIR)\mozcpl.res ..\mozcpl.def mozcpl.mak
|
||||
link $(DLL_OPTS) /DEF:..\mozcpl.def /OUT:$(DLL) $(OBJDIR)\mozcpl.obj $(OBJDIR)\cpl_name.obj $(OBJDIR)\mozcpl.res user32.lib shell32.lib
|
||||
|
||||
$(OBJDIR)\mozcpl.obj : ..\mozcpl.cpp mozcpl.mak
|
||||
cl $(CPP_OPTS) ..\mozcpl.cpp
|
||||
|
||||
$(OBJDIR)\cpl_name.obj : ..\cpl_name.cpp mozcpl.mak
|
||||
cl $(CPP_OPTS) ..\cpl_name.cpp
|
||||
|
||||
$(OBJDIR)\mozcpl.res : ..\mozcpl.rc mozcpl.mak
|
||||
rc -r -fo$@ ..\mozcpl.rc
|
89
cmd/winfe/mozcpl.cpp
Normal file
89
cmd/winfe/mozcpl.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape Communications Corporation.
|
||||
Portions created by Netscape are Copyright (C) 1998 Netscape Communications Corporation.
|
||||
All Rights Reserved.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <cpl.h>
|
||||
|
||||
extern const char * const module_name;
|
||||
|
||||
#define MessageBox(a,b,c,d)
|
||||
|
||||
static HWND hwndControlPanel = NULL;
|
||||
static HINSTANCE hinst = NULL;
|
||||
|
||||
LONG APIENTRY CPlApplet( HWND hwndCPl, // handle to Control Panel window
|
||||
UINT uMsg, // message
|
||||
LONG lParam1, // first message parameter
|
||||
LONG lParam2 ) { // second message parameter
|
||||
LONG result = 0;
|
||||
|
||||
NEWCPLINFO *pNewCPlInfo;
|
||||
|
||||
switch ( uMsg ) {
|
||||
case CPL_INIT:
|
||||
MessageBox( hwndControlPanel, "CPL_INIT", "Mozilla Control Panel", MB_OK );
|
||||
hinst = GetModuleHandle( module_name );
|
||||
result = 1;
|
||||
break;
|
||||
|
||||
case CPL_GETCOUNT:
|
||||
MessageBox( hwndControlPanel, "CPL_GETCOUNT", "Mozilla Control Panel", MB_OK );
|
||||
result = 1;
|
||||
break;
|
||||
|
||||
case CPL_NEWINQUIRE:
|
||||
MessageBox( hwndControlPanel, "CPL_NEWINQUIRE", "Mozilla Control Panel", MB_OK );
|
||||
pNewCPlInfo = (NEWCPLINFO*) lParam2;
|
||||
|
||||
pNewCPlInfo->dwSize = (DWORD) sizeof(NEWCPLINFO);
|
||||
pNewCPlInfo->dwFlags = 0;
|
||||
pNewCPlInfo->dwHelpContext = 0;
|
||||
pNewCPlInfo->lData = 0;
|
||||
pNewCPlInfo->hIcon = LoadIcon( hinst, MAKEINTRESOURCE(101) );
|
||||
pNewCPlInfo->szHelpFile[0] = '\0';
|
||||
|
||||
LoadString( hinst, 102, pNewCPlInfo->szName, sizeof pNewCPlInfo->szName );
|
||||
LoadString( hinst, 103, pNewCPlInfo->szInfo, sizeof pNewCPlInfo->szInfo );
|
||||
|
||||
break;
|
||||
|
||||
case CPL_SELECT:
|
||||
MessageBox( hwndControlPanel, "CPL_SELECT", "Mozilla Control Panel", MB_OK );
|
||||
break;
|
||||
|
||||
case CPL_DBLCLK:
|
||||
MessageBox( hwndControlPanel, "CPL_DBLCLK", "Mozilla Control Panel", MB_OK );
|
||||
(MessageBoxA)( hwndControlPanel, "Mozilla preferences pane coming soon!", "Preferences", MB_OKCANCEL );
|
||||
//ShellExecute( NULL, "open", "e:\\x86Dbg\\mozilla.exe", "-prefs", "e:\\x86Dbg", SW_SHOW );
|
||||
break;
|
||||
|
||||
case CPL_STOP:
|
||||
MessageBox( hwndControlPanel, "CPL_STOP", "Mozilla Control Panel", MB_OK );
|
||||
break;
|
||||
|
||||
case CPL_EXIT:
|
||||
MessageBox( hwndControlPanel, "CPL_EXIT", "Mozilla Control Panel", MB_OK );
|
||||
break;
|
||||
|
||||
default:
|
||||
MessageBox( hwndControlPanel, "CPL_?????", "Mozilla Control Panel", MB_OK );
|
||||
result = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
17
cmd/winfe/mozcpl.def
Normal file
17
cmd/winfe/mozcpl.def
Normal file
@ -0,0 +1,17 @@
|
||||
; The contents of this file are subject to the Netscape Public License
|
||||
; Version 1.0 (the "NPL"); you may not use this file except in
|
||||
; compliance with the NPL. You may obtain a copy of the NPL at
|
||||
; http://www.mozilla.org/NPL/
|
||||
;
|
||||
; Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
; for the specific language governing rights and limitations under the
|
||||
; NPL.
|
||||
;
|
||||
; The Initial Developer of this code under the NPL is Netscape
|
||||
; Communications Corporation. Portions created by Netscape are
|
||||
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
; Reserved.
|
||||
|
||||
EXPORTS
|
||||
CPlApplet
|
25
cmd/winfe/mozcpl.rc
Normal file
25
cmd/winfe/mozcpl.rc
Normal file
@ -0,0 +1,25 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
101 ICON DISCARDABLE "res/silver.ico"
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
102 "Mozilla"
|
||||
103 "Mozilla Browser Settings"
|
||||
END
|
Loading…
Reference in New Issue
Block a user