зеркало из https://github.com/mozilla/gecko-dev.git
First stab at cocoa. [not part of build]
This commit is contained in:
Родитель
efe4a17b1f
Коммит
a046a1b9cb
|
@ -0,0 +1,123 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.1 (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.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = widget
|
||||
LIBRARY_NAME = widget_mac
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsWidgetMacModule
|
||||
XPIDL_MODULE = widget
|
||||
REQUIRES = xpcom \
|
||||
gfx \
|
||||
string \
|
||||
uconv \
|
||||
dom \
|
||||
webshell \
|
||||
docshell \
|
||||
plugin \
|
||||
content \
|
||||
layout \
|
||||
view \
|
||||
xul \
|
||||
necko \
|
||||
nkcache \
|
||||
locale \
|
||||
pref \
|
||||
appshell \
|
||||
intl \
|
||||
timer \
|
||||
mimetype \
|
||||
$(NULL)
|
||||
|
||||
GFX_LCPPSRCS = \
|
||||
nsRegionMac.cpp \
|
||||
nsWatchTask.cpp \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
nsBidiKeyboard.cpp \
|
||||
nsClipboard.cpp \
|
||||
nsDeleteObserver.cpp \
|
||||
nsDragService.cpp \
|
||||
nsFilePicker.cpp \
|
||||
nsLookAndFeel.cpp \
|
||||
nsMacResources.cpp \
|
||||
nsMenuX.cpp \
|
||||
nsMenuBarX.cpp \
|
||||
nsMenuItemX.cpp \
|
||||
nsMimeMapper.cpp \
|
||||
nsSound.cpp \
|
||||
nsTSMStrategy.cpp \
|
||||
nsToolkit.cpp \
|
||||
$(GFX_LCPPSRCS) \
|
||||
$(NULL)
|
||||
|
||||
CMMSRCS = \
|
||||
nsAppShellCocoa.mm \
|
||||
nsCocoaWindow.mm \
|
||||
nsChildView.mm \
|
||||
nsWidgetFactory.mm \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS += \
|
||||
nsIChangeManager.idl \
|
||||
nsIMenuCommandDispatcher.idl \
|
||||
$(NULL)
|
||||
|
||||
GARBAGE += $(GFX_LCPPSRCS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
export:: $(addprefix $(topsrcdir)/gfx/src/mac/,$(GFX_LCPPSRCS))
|
||||
$(INSTALL) $^ .
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(DIST)/lib/libxpwidgets_s.a \
|
||||
$(TK_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
-lgkgfx \
|
||||
-ltimer_mac \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
$(TK_CFLAGS) \
|
||||
-I$(topsrcdir)/gfx/src/mac \
|
||||
-I$(srcdir)/../xpwidgets \
|
||||
-I$(topsrcdir)/widget/timer/src/mac \
|
||||
-I/System/Library/Frameworks/Carbon.Framework/Headers \
|
||||
-I/System/Library/Frameworks/Cocoa.Framework/Headers \
|
||||
$(NULL)
|
||||
|
||||
# for "EnterMovies" in nsSound.cpp
|
||||
LDFLAGS += \
|
||||
-framework QuickTime \
|
||||
-framework Cocoa \
|
||||
$(NULL)
|
||||
|
||||
CXXFLAGS += \
|
||||
-DUSE_COCOA \
|
||||
$(NULL)
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (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/MPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mike Pinkerton
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAtom.idl"
|
||||
|
||||
|
||||
interface nsIContent;
|
||||
interface nsIDocument;
|
||||
|
||||
|
||||
//
|
||||
// nsIChangeObserver
|
||||
//
|
||||
// Something that wants to be alerted to changes in attributes or changes in
|
||||
// its corresponding content object.
|
||||
// (NOTE: If we need more things, we can add them later)
|
||||
//
|
||||
[scriptable, uuid(d8cf3bd0-1dd1-11b2-a837-fec5f865b071)]
|
||||
interface nsIChangeObserver : nsISupports
|
||||
{
|
||||
void AttributeChanged ( in nsIDocument aDocument,
|
||||
in long aNameSpaceID, in nsIAtom aAttribute, in long aHint) ;
|
||||
|
||||
void ContentRemoved ( in nsIDocument aDocument, in nsIContent aChild,
|
||||
in long aIndexInContainer ) ;
|
||||
|
||||
void ContentInserted ( in nsIDocument aDocument, in nsIContent aChild,
|
||||
in long aIndexInContainer ) ;
|
||||
|
||||
}; // nsIChangeObserver
|
||||
|
||||
|
||||
//
|
||||
// nsIChangeManager
|
||||
//
|
||||
// A central manager for registering and unregistering objects that want
|
||||
// to be notified when content objects change or children added/removed, etc.
|
||||
//
|
||||
// We use a central manager to redirect for performance reasons, to avoid
|
||||
// every meny/item from getting a call when any change to the document happens.
|
||||
//
|
||||
|
||||
[scriptable, uuid(fb31c7e0-1dd1-11b2-8a61-f4697ef53c88)]
|
||||
interface nsIChangeManager : nsISupports
|
||||
{
|
||||
void Register ( in nsIContent aContent, in nsIChangeObserver aMenuObject ) ;
|
||||
void Unregister ( in nsIContent aContent ) ;
|
||||
|
||||
nsIChangeObserver Lookup ( in nsIContent aContent ) ;
|
||||
|
||||
}; // nsPIChangeManager
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (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/MPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mike Pinkerton
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
|
||||
interface nsIMenuItem;
|
||||
|
||||
|
||||
//
|
||||
// nsIMenuCommandDispatcher
|
||||
//
|
||||
// A central manager for registering and unregistering CommandIDs
|
||||
// and their associated content node in the DOM.
|
||||
//
|
||||
|
||||
[scriptable, uuid(d1969b7e-1dd1-11b2-a442-c5a01ae643d1)]
|
||||
interface nsIMenuCommandDispatcher : nsISupports
|
||||
{
|
||||
// Given a menu item, creates a unique 4-character command ID and
|
||||
// maps it to the item. Returns the id for use by the client.
|
||||
unsigned long Register ( in nsIMenuItem aItem ) ;
|
||||
|
||||
// Removes the mapping between the given 4-character command ID
|
||||
// and its associated menu item.
|
||||
void Unregister ( in unsigned long aCommandID ) ;
|
||||
|
||||
}; // nsIMenuCommandDispatcher
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче