Compare commits

..

2 Commits

Author SHA1 Message Date
spider
0454ef3092 Add Display query
git-svn-id: svn://10.0.0.236/branches/TREX_WIDGET_BRANCH@3234 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-04 18:39:17 +00:00
(no author)
2ff40f781d This commit was manufactured by cvs2svn to create branch
'TREX_WIDGET_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/TREX_WIDGET_BRANCH@2891 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-02 01:21:30 +00:00
17 changed files with 1448 additions and 881 deletions

View File

@@ -1,2 +0,0 @@
Clobbering to pick up changes from bug 409803.

View File

@@ -1,27 +0,0 @@
#
## hostname: fx-linux-tbox
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
export CFLAGS="-gstabs+"
export CXXFLAGS="-gstabs+"
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging mozilla/tools/codesighs"
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-update-packaging
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
#not yet
#ac_add_options --enable-glitz
ac_add_options --enable-codesighs
CC=/tools/gcc/bin/gcc
CXX=/tools/gcc/bin/g++

View File

@@ -1,269 +0,0 @@
#
## hostname: fx-linux-tbox
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# To ensure Talkback client builds properly on some Linux boxen where LANG
# is set to "en_US.UTF-8" by default, override that setting here by setting
# it to "en_US.iso885915" (the setting on ocean). Proper fix is to update
# where xrestool is called in the build system so that 'LANG=C' in its
# environment, according to bryner.
$ENV{LANG} = "en_US.iso885915";
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = 'Mozilla';
# CONFIG: $RunMozillaTests = %runMozillaTests%;
$RunMozillaTests = 1;
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 1; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 1; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'fx-linux-tbox';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
$pageload_server = "pageload.build.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = ':ext:cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Nightly';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaTest';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = 14;
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "ffxbld";
$ssh_key = "'$ENV{HOME}/.ssh/ffxbld_dsa'";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "firefox";
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
$milestone = "trunk";
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
# CONFIG: $update_aus_host = '%ausServer%';
$update_aus_host = 'aus2-staging.mozilla.org';
$update_pushinfo = 0;
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "Linux_x86-gcc3";
$update_hash = "sha1";
# CONFIG: $update_filehost = '%ftpServer%';
$update_filehost = 'ftp.mozilla.org';
$update_ver_file = 'browser/config/version.txt';
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
trigger a nightly to push the fix to bug 421841 to users

View File

@@ -1,28 +0,0 @@
#
## hostname: bm-xserve08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
# symbols for breakpad
export CFLAGS="-g -gfull"
export CXXFLAGS="-g -gfull"
. $topsrcdir/build/macosx/universal/mozconfig
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging mozilla/tools/codesighs"
mk_add_options MOZ_CO_PROJECT="browser"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=nightly
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-update-packaging
# ac_add_options --enable-official-branding
ac_add_app_options ppc --enable-prebinding
ac_add_options --enable-codesighs

View File

@@ -1,269 +0,0 @@
#
## hostname: bm-xserve08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{NO_EM_RESTART} = "1";
$ENV{DYLD_NO_FIX_PREBINDING} = "1";
$ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
$MacUniversalBinary = 1;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = 'Minefield';
$VendorName = "";
# CONFIG: $RunMozillaTests = %runMozillaTests%;
$RunMozillaTests = 1;
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 1; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$LayoutPerformanceLocalTest = 0; # Tp2
$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'xserve08.build.mozilla.org_Fx-Trunk';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
$pageload_server = "pageload.build.mozilla.org"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 10;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
$LayoutPerformanceTestTimeout = 300; # entire test, seconds
$LayoutPerformanceLocalTestTimeout = 180; # entire test, seconds
$DHTMLPerformanceTestTimeout = 180; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = ':ext:cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = '../build/universal';
# Extra build name, if needed.
$BuildNameExtra = 'Universal Nightly';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaTest';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "14";
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "ffxbld";
$ssh_key = "'$ENV{HOME}/.ssh/ffxbld_dsa'";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "firefox";
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
$milestone = "trunk";
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
# CONFIG: $update_aus_host = '%ausServer%';
$update_aus_host = 'aus2-staging.mozilla.org';
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "Darwin_Universal-gcc3";
$update_hash = "sha1";
# CONFIG: $update_filehost = '%ftpServer%';
$update_filehost = 'ftp.mozilla.org';
$update_ver_file = 'browser/config/version.txt';
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
Clobbering to pick up fixes from bug 419319.

View File

@@ -1,20 +0,0 @@
#
## hostname: fx-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
export CFLAGS="-GL -wd4624 -wd4952"
export CXXFLAGS="-GL -wd4624 -wd4952"
export LDFLAGS="-LTCG"
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE_FLAGS="-j5"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-update-packaging
ac_add_options --enable-jemalloc

View File

@@ -1,264 +0,0 @@
#
## hostname: fx-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{NO_EM_RESTART} = '1';
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = "Mozilla";
# CONFIG: $RunMozillaTests = %runMozillaTests%;
$RunMozillaTests = 1;
$RegxpcomTest = 1;
$AliveTest = 1;
$JavaTest = 0;
$ViewerTest = 0;
$BloatTest = 0; # warren memory bloat test
$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
$DomToTextConversionTest = 0;
$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
$MailBloatTest = 0;
$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$DHTMLPerformanceTest = 0; # Tdhtml
$QATest = 0;
$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$NeckoUnitTest = 0;
$RenderPerformanceTest = 0; # Tgfx
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'fx-win32-tbox';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "pageload.build.mozilla.org"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 30;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 20; # seconds
#$XULWindowOpenTestTimeout = 90; # seconds
#$NeckoUnitTestTimeout = 30; # seconds
$RenderPerformanceTestTimeout = 1800; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
$Make = 'make'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
$blat = '/d/mozilla-build/blat261/full/blat';
#$use_blat = 1;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = ':ext:cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Nightly';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaTest';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
$ProfiledBuild = 1;
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "14";
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "ffxbld";
$ssh_key = "'$ENV{HOME}/.ssh/ffxbld_dsa'";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "firefox";
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
$milestone = "trunk";
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 1;
$archive = 1;
$push_raw_xpis = 0;
# CONFIG: $update_aus_host = '%ausServer%';
$update_aus_host = 'aus2-staging.mozilla.org';
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "WINNT_x86-msvc";
$update_hash = "sha1";
# CONFIG: $update_filehost = '%ftpServer%';
$update_filehost = 'ftp.mozilla.org';
$update_ver_file = 'browser/config/version.txt';
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -0,0 +1,57 @@
#!gmake
#
# 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.
DEPTH = ../../..
LIBRARY_NAME = widgetunix
MODULE=raptor
REQUIRES=util img xpcom raptor netlib
DEFINES = -D_IMPL_NS_WIDGET
EXTRA_DSO_LDOPTS+= \
$(DIST)/bin/libxpcom.so \
$(LIBNSPR) -lXm -lXt -lX11
CPPSRCS=nsWidgetFactory.cpp \
nsWindow.cpp \
nsXtEventHandler.cpp \
nsToolkit.cpp
CPP_OBJS= \
./$(OBJDIR)/nsWidgetFactory.o \
./$(OBJDIR)/nsWindow.o \
./$(OBJDIR)/nsToolkit.o \
./$(OBJDIR)/nsXtEventHandler.o \
$(NULL)
include $(DEPTH)/config/config.mk
TARGETS = $(LIBRARY)
include $(DEPTH)/config/rules.mk

View File

@@ -0,0 +1,70 @@
/* -*- 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 "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.
*/
#include "nsToolkit.h"
#include "nsWindow.h"
#include "prmon.h"
#include "prtime.h"
#include "nsGUIEvent.h"
void RunPump(void* arg)
{
}
//-------------------------------------------------------------------------
//
// constructor
//
//-------------------------------------------------------------------------
nsToolkit::nsToolkit()
{
NS_INIT_REFCNT();
}
//-------------------------------------------------------------------------
//
// destructor
//
//-------------------------------------------------------------------------
nsToolkit::~nsToolkit()
{
}
//-------------------------------------------------------------------------
//
// nsISupports implementation macro
//
//-------------------------------------------------------------------------
NS_DEFINE_IID(kIToolkitIID, NS_ITOOLKIT_IID);
NS_IMPL_ISUPPORTS(nsToolkit,kIToolkitIID);
//-------------------------------------------------------------------------
//
//
//-------------------------------------------------------------------------
void nsToolkit::Init(PRThread *aThread)
{
}

View File

@@ -0,0 +1,50 @@
/* -*- 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 "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.
*/
#ifndef TOOLKIT_H
#define TOOLKIT_H
#include "nsIToolkit.h"
struct MethodInfo;
/**
* Wrapper around the thread running the message pump.
* The toolkit abstraction is necessary because the message pump must
* execute within the same thread that created the widget under Win32.
*/
class nsToolkit : public nsIToolkit
{
public:
nsToolkit();
NS_DECL_ISUPPORTS
virtual void Init(PRThread *aThread);
private:
~nsToolkit();
};
#endif // TOOLKIT_H

View File

@@ -0,0 +1,151 @@
/* -*- 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.
*/
#include "nsIFactory.h"
#include "nsISupports.h"
#include "nsWidgetsCID.h"
#include "nsToolkit.h"
#include "nsWindow.h"
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
static NS_DEFINE_IID(kIWidget, NS_IWIDGET_IID);
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
class nsWidgetFactory : public nsIFactory
{
public:
NS_DECL_ISUPPORTS
// nsIFactory methods
NS_IMETHOD CreateInstance(nsISupports *aOuter,
const nsIID &aIID,
void **aResult);
NS_IMETHOD LockFactory(PRBool aLock);
nsWidgetFactory();
~nsWidgetFactory();
};
nsWidgetFactory::nsWidgetFactory()
{
}
nsWidgetFactory::~nsWidgetFactory()
{
}
nsresult nsWidgetFactory::QueryInterface(const nsIID &aIID,
void **aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(kIFactoryIID)) {
*aInstancePtr = (void*)(nsWidgetFactory*)this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*)(nsISupports*)(nsWidgetFactory*)this;
AddRef();
return NS_OK;
}
return NS_NOINTERFACE;
}
NS_IMPL_ADDREF(nsWidgetFactory)
NS_IMPL_RELEASE(nsWidgetFactory)
nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
const nsIID &aIID,
void **aResult)
{
if (aResult == NULL) {
return NS_ERROR_NULL_POINTER;
}
*aResult = NULL;
if (nsnull != aOuter && !aIID.Equals(kISupportsIID)) {
// aggregation with IID != nsISupports
return NS_ERROR_ILLEGAL_VALUE;
}
nsIWidget *inst = nsnull;
if (aIID.Equals(kCWindow)) {
inst = (nsIWidget*)new nsWindow(aOuter);
}
else if (aIID.Equals(kIWidget)) {
inst = (nsIWidget*)new nsWindow(aOuter);
}
else if (aIID.Equals(kCChild)) {
inst = (nsIWidget*)new ChildWindow(aOuter);
}
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult res = inst->QueryInterface(aIID, aResult);
if (res != NS_OK) {
delete inst ;
}
return res;
return NS_OK;
}
nsresult nsWidgetFactory::LockFactory(PRBool aLock)
{
// Not implemented in simplest case.
return NS_OK;
}
// return the proper factory to the caller
extern "C" NS_WIDGET nsresult NSGetFactory(const nsCID &aClass, nsIFactory **aFactory)
{
if (nsnull == aFactory) {
return NS_ERROR_NULL_POINTER;
}
*aFactory = new nsWidgetFactory();
if (nsnull == aFactory) {
return NS_ERROR_OUT_OF_MEMORY;
}
return (*aFactory)->QueryInterface(kIFactoryIID, (void**)aFactory);
}

View File

@@ -0,0 +1,704 @@
/* -*- 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 "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.
*/
#include "nsWindow.h"
#include "nsIFontMetrics.h"
#include "nsIFontCache.h"
#include "nsGUIEvent.h"
#include "nsIRenderingContext.h"
#include "nsIDeviceContext.h"
#include "nsRect.h"
#include "nsTransform2D.h"
#include "nsGfxCIID.h"
#include "nsXtEventHandler.h"
#include "Xm/Xm.h"
#include "Xm/MainW.h"
#include "Xm/Frame.h"
#include "Xm/XmStrDefs.h"
#include "Xm/DrawingA.h"
#include "stdio.h"
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
NS_IMPL_QUERY_INTERFACE(nsWindow, kIWidgetIID)
NS_IMPL_ADDREF(nsWindow)
NS_IMPL_RELEASE(nsWindow)
void nsWindow::WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect)
{
}
void nsWindow::ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect)
{
}
//-------------------------------------------------------------------------
//
// Setup initial tooltip rectangles
//
//-------------------------------------------------------------------------
void nsWindow::SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[])
{
}
//-------------------------------------------------------------------------
//
// Update all tooltip rectangles
//
//-------------------------------------------------------------------------
void nsWindow::UpdateTooltips(nsRect* aNewTips[])
{
}
//-------------------------------------------------------------------------
//
// Remove all tooltip rectangles
//
//-------------------------------------------------------------------------
void nsWindow::RemoveTooltips()
{
}
//-------------------------------------------------------------------------
//
// nsWindow constructor
//
//-------------------------------------------------------------------------
nsWindow::nsWindow(nsISupports *aOuter)
{
// XXX Til can deal with ColorMaps!
SetForegroundColor(1);
SetBackgroundColor(2);
mToolkit = nsnull ;
}
//-------------------------------------------------------------------------
//
// nsWindow destructor
//
//-------------------------------------------------------------------------
nsWindow::~nsWindow()
{
}
//-------------------------------------------------------------------------
//
// Create the proper widget
//
//-------------------------------------------------------------------------
void nsWindow::Create(nsIWidget *aParent,
const nsRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
Widget mainWindow, frame;
Widget parentWidget;
if (nsnull == mToolkit) {
if (nsnull != aToolkit) {
mToolkit = (nsToolkit*)aToolkit;
mToolkit->AddRef();
}
else {
if (nsnull != aParent) {
mToolkit = (nsToolkit*)(aParent->GetToolkit()); // the call AddRef's, we don't have to
}
// it's some top level window with no toolkit passed in.
// Create a default toolkit with the current thread
else {
mToolkit = new nsToolkit();
mToolkit->AddRef();
mToolkit->Init(PR_GetCurrentThread());
}
}
}
// save the event callback function
mEventCallback = aHandleEventFunction;
// keep a reference to the toolkit object
if (aContext) {
mContext = aContext;
mContext->AddRef();
}
else {
nsresult res;
// XXX Move this! - For some reason Registering in another DLL (shell) isn't working
#define GFXWIN_DLL "libgfxunix.so"
static NS_DEFINE_IID(kCRenderingContextIID, NS_RENDERING_CONTEXT_CID);
static NS_DEFINE_IID(kCDeviceContextIID, NS_DEVICE_CONTEXT_CID);
static NS_DEFINE_IID(kCFontMetricsIID, NS_FONT_METRICS_CID);
static NS_DEFINE_IID(kCImageIID, NS_IMAGE_CID);
NSRepository::RegisterFactory(kCRenderingContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kCDeviceContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kCFontMetricsIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kCImageIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
res = NSRepository::CreateInstance(kDeviceContextCID,
nsnull,
kDeviceContextIID,
(void **)&mContext);
if (NS_OK == res)
mContext->Init();
}
if (aParent)
parentWidget = (Widget) aParent->GetNativeData(NS_NATIVE_WIDGET);
else
parentWidget = (Widget) aInitData ;
if (!aParent)
mainWindow = ::XtVaCreateManagedWidget("mainWindow",
xmMainWindowWidgetClass,
parentWidget,
XmNwidth, aRect.width,
XmNheight, aRect.height,
nsnull);
frame = ::XtVaCreateManagedWidget("frame",
xmDrawingAreaWidgetClass,
(aParent) ? parentWidget : mainWindow,
XmNwidth, aRect.width,
XmNheight, aRect.height,
nsnull);
if (!aParent)
XmMainWindowSetAreas (mainWindow, nsnull, nsnull, nsnull, nsnull, frame);
mWidget = frame ;
if (aParent) {
aParent->AddChild(this);
}
// setup the event Handlers
XtAddEventHandler(mWidget,
ExposureMask,
PR_FALSE,
nsXtWidget_ExposureMask_EventHandler,
this);
XtAddEventHandler(mWidget,
ButtonPressMask,
PR_FALSE,
nsXtWidget_ButtonPressMask_EventHandler,
this);
XtAddEventHandler(mWidget,
ButtonReleaseMask,
PR_FALSE,
nsXtWidget_ButtonReleaseMask_EventHandler,
this);
XtAddEventHandler(mWidget,
ButtonMotionMask,
PR_FALSE,
nsXtWidget_ButtonMotionMask_EventHandler,
this);
// Force cursor to default setting
mCursor = eCursor_select;
SetCursor(eCursor_standard);
}
//-------------------------------------------------------------------------
//
// create with a native parent
//
//-------------------------------------------------------------------------
void nsWindow::Create(nsNativeWindow aParent,
const nsRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
}
//-------------------------------------------------------------------------
//
// Close this nsWindow
//
//-------------------------------------------------------------------------
void nsWindow::Destroy()
{
}
//-------------------------------------------------------------------------
//
// Get this nsWindow parent
//
//-------------------------------------------------------------------------
nsIWidget* nsWindow::GetParent(void)
{
return nsnull;
}
//-------------------------------------------------------------------------
//
// Get this nsWindow's list of children
//
//-------------------------------------------------------------------------
nsIEnumerator* nsWindow::GetChildren()
{
return nsnull;
}
//-------------------------------------------------------------------------
//
// Add a child to the list of children
//
//-------------------------------------------------------------------------
void nsWindow::AddChild(nsIWidget* aChild)
{
}
//-------------------------------------------------------------------------
//
// Remove a child from the list of children
//
//-------------------------------------------------------------------------
void nsWindow::RemoveChild(nsIWidget* aChild)
{
}
//-------------------------------------------------------------------------
//
// Hide or show this component
//
//-------------------------------------------------------------------------
void nsWindow::Show(PRBool bState)
{
}
//-------------------------------------------------------------------------
//
// Move this component
//
//-------------------------------------------------------------------------
void nsWindow::Move(PRUint32 aX, PRUint32 aY)
{
}
//-------------------------------------------------------------------------
//
// Resize this component
//
//-------------------------------------------------------------------------
void nsWindow::Resize(PRUint32 aWidth, PRUint32 aHeight, PRBool aRepaint)
{
}
//-------------------------------------------------------------------------
//
// Resize this component
//
//-------------------------------------------------------------------------
void nsWindow::Resize(PRUint32 aX,
PRUint32 aY,
PRUint32 aWidth,
PRUint32 aHeight,
PRBool aRepaint)
{
}
//-------------------------------------------------------------------------
//
// Enable/disable this component
//
//-------------------------------------------------------------------------
void nsWindow::Enable(PRBool bState)
{
}
//-------------------------------------------------------------------------
//
// Give the focus to this component
//
//-------------------------------------------------------------------------
void nsWindow::SetFocus(void)
{
}
//-------------------------------------------------------------------------
//
// Get this component dimension
//
//-------------------------------------------------------------------------
void nsWindow::GetBounds(nsRect &aRect)
{
XWindowAttributes attrs ;
Display * d = ::XtDisplay(mWidget);
Window w = ::XtWindow(mWidget);
XGetWindowAttributes(d, w, &attrs);
aRect.x = attrs.x ;
aRect.y = attrs.y ;
aRect.width = attrs.width ;
aRect.height = attrs.height;
}
//-------------------------------------------------------------------------
//
// Get the foreground color
//
//-------------------------------------------------------------------------
nscolor nsWindow::GetForegroundColor(void)
{
return (mForeground);
}
//-------------------------------------------------------------------------
//
// Set the foreground color
//
//-------------------------------------------------------------------------
void nsWindow::SetForegroundColor(const nscolor &aColor)
{
mForeground = aColor;
}
//-------------------------------------------------------------------------
//
// Get the background color
//
//-------------------------------------------------------------------------
nscolor nsWindow::GetBackgroundColor(void)
{
return (mBackground);
}
//-------------------------------------------------------------------------
//
// Set the background color
//
//-------------------------------------------------------------------------
void nsWindow::SetBackgroundColor(const nscolor &aColor)
{
mBackground = aColor ;
}
//-------------------------------------------------------------------------
//
// Get this component font
//
//-------------------------------------------------------------------------
nsIFontMetrics* nsWindow::GetFont(void)
{
NS_NOTYETIMPLEMENTED("GetFont not yet implemented"); // to be implemented
return nsnull;
}
//-------------------------------------------------------------------------
//
// Set this component font
//
//-------------------------------------------------------------------------
void nsWindow::SetFont(const nsFont &aFont)
{
}
//-------------------------------------------------------------------------
//
// Get this component cursor
//
//-------------------------------------------------------------------------
nsCursor nsWindow::GetCursor()
{
}
//-------------------------------------------------------------------------
//
// Set this component cursor
//
//-------------------------------------------------------------------------
void nsWindow::SetCursor(nsCursor aCursor)
{
}
//-------------------------------------------------------------------------
//
// Invalidate this component visible area
//
//-------------------------------------------------------------------------
void nsWindow::Invalidate(PRBool aIsSynchronous)
{
}
//-------------------------------------------------------------------------
//
// Return some native data according to aDataType
//
//-------------------------------------------------------------------------
void* nsWindow::GetNativeData(PRUint32 aDataType)
{
switch(aDataType) {
case NS_NATIVE_DISPLAY:
{
return (void*)XtDisplay(mWidget);
}
break;
case NS_NATIVE_WINDOW:
{
return (void*)XtWindow(mWidget);
}
break;
case NS_NATIVE_WIDGET:
{
return (void*)(mWidget);
}
break;
case NS_NATIVE_GRAPHIC:
{
XGCValues values;
GC aGC;
aGC= ::XtGetGC(mWidget,
nsnull,
&values);
return (void*)aGC;
}
break;
case NS_NATIVE_COLORMAP:
default:
break;
}
return NULL;
}
//-------------------------------------------------------------------------
//
// Create a rendering context from this nsWindow
//
//-------------------------------------------------------------------------
nsIRenderingContext* nsWindow::GetRenderingContext()
{
return nsnull ;
}
//-------------------------------------------------------------------------
//
// Return the toolkit this widget was created on
//
//-------------------------------------------------------------------------
nsIToolkit* nsWindow::GetToolkit()
{
}
//-------------------------------------------------------------------------
//
// Set the colormap of the window
//
//-------------------------------------------------------------------------
void nsWindow::SetColorMap(nsColorMap *aColorMap)
{
}
//-------------------------------------------------------------------------
//
// Return the used device context
//
//-------------------------------------------------------------------------
nsIDeviceContext* nsWindow::GetDeviceContext()
{
}
//-------------------------------------------------------------------------
//
// Scroll the bits of a window
//
//-------------------------------------------------------------------------
void nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
{
}
void nsWindow::SetBorderStyle(nsBorderStyle aBorderStyle)
{
}
void nsWindow::SetTitle(const nsString& aTitle)
{
}
/**
* Processes a mouse pressed event
*
**/
void nsWindow::AddMouseListener(nsIMouseListener * aListener)
{
}
/**
* Processes a mouse pressed event
*
**/
void nsWindow::AddEventListener(nsIEventListener * aListener)
{
}
PRBool nsWindow::ConvertStatus(nsEventStatus aStatus)
{
switch(aStatus) {
case nsEventStatus_eIgnore:
return(PR_FALSE);
break;
case nsEventStatus_eConsumeNoDefault:
return(PR_TRUE);
break;
case nsEventStatus_eConsumeDoDefault:
return(PR_FALSE);
break;
default:
NS_ASSERTION(0, "Illegal nsEventStatus enumeration value");
return(PR_FALSE);
break;
}
}
//-------------------------------------------------------------------------
//
// Invokes callback and ProcessEvent method on Event Listener object
//
//-------------------------------------------------------------------------
PRBool nsWindow::DispatchEvent(nsGUIEvent* event)
{
PRBool result = PR_FALSE;
if (nsnull != mEventCallback) {
result = ConvertStatus((*mEventCallback)(event));
}
// Dispatch to event listener if event was not consumed
if ((result != PR_TRUE) && (nsnull != mEventListener)) {
return ConvertStatus(mEventListener->ProcessEvent(*event));
}
else {
return(result);
}
}
/**
* Processes an Expose Event
*
**/
void nsWindow::OnPaint(nsPaintEvent &event)
{
nsresult result ;
// call the event callback
if (mEventCallback) {
nsRect rr ;
GetBounds(rr);
event.rect = &rr;
static NS_DEFINE_IID(kRenderingContextCID, NS_RENDERING_CONTEXT_CID);
static NS_DEFINE_IID(kRenderingContextIID, NS_IRENDERING_CONTEXT_IID);
if (NS_OK == NSRepository::CreateInstance(kRenderingContextCID,
nsnull,
kRenderingContextIID,
(void **)&event.renderingContext))
{
event.renderingContext->Init(mContext, this);
result = DispatchEvent(&event);
NS_RELEASE(event.renderingContext);
}
else
result = PR_FALSE;
}
}
void nsWindow::BeginResizingChildren(void)
{
}
void nsWindow::EndResizingChildren(void)
{
}

View File

@@ -0,0 +1,320 @@
/* -*- 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 "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.
*/
#ifndef Window_h__
#define Window_h__
#include "nsToolkit.h"
#include "nsIWidget.h"
#include "nsIEnumerator.h"
#include "nsIMouseListener.h"
#include "nsIEventListener.h"
#include "nsString.h"
#include "Xm/Xm.h"
#define NSRGB_2_COLOREF(color) \
RGB(NS_GET_R(color),NS_GET_G(color),NS_GET_B(color))
/**
* Native WIN32 window wrapper.
*/
class nsWindow : public nsIWidget
{
public:
nsWindow(nsISupports *aOuter);
virtual ~nsWindow();
NS_DECL_ISUPPORTS
// nsIWidget interface
virtual void Create(nsIWidget *aParent,
const nsRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);
virtual void Create(nsNativeWindow aParent,
const nsRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);
virtual void Destroy();
virtual nsIWidget* GetParent(void);
virtual nsIEnumerator* GetChildren();
virtual void AddChild(nsIWidget* aChild);
virtual void RemoveChild(nsIWidget* aChild);
virtual void Show(PRBool bState);
virtual void Move(PRUint32 aX, PRUint32 aY);
virtual void Resize(PRUint32 aWidth,
PRUint32 aHeight,
PRBool aRepaint);
virtual void Resize(PRUint32 aX,
PRUint32 aY,
PRUint32 aWidth,
PRUint32 aHeight,
PRBool aRepaint);
virtual void Enable(PRBool bState);
virtual void SetFocus(void);
virtual void GetBounds(nsRect &aRect);
virtual nscolor GetForegroundColor(void);
virtual void SetForegroundColor(const nscolor &aColor);
virtual nscolor GetBackgroundColor(void);
virtual void SetBackgroundColor(const nscolor &aColor);
virtual nsIFontMetrics* GetFont(void);
virtual void SetFont(const nsFont &aFont);
virtual nsCursor GetCursor();
virtual void SetCursor(nsCursor aCursor);
virtual void Invalidate(PRBool aIsSynchronous);
virtual void* GetNativeData(PRUint32 aDataType);
virtual nsIRenderingContext* GetRenderingContext();
virtual void SetColorMap(nsColorMap *aColorMap);
virtual nsIDeviceContext* GetDeviceContext();
virtual void Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
virtual nsIToolkit* GetToolkit();
virtual void SetBorderStyle(nsBorderStyle aBorderStyle);
virtual void SetTitle(const nsString& aTitle);
virtual void SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[]);
virtual void RemoveTooltips();
virtual void UpdateTooltips(nsRect* aNewTips[]);
virtual void WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect);
virtual void ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect);
virtual void AddMouseListener(nsIMouseListener * aListener);
virtual void AddEventListener(nsIEventListener * aListener);
virtual void OnPaint(nsPaintEvent &event);
PRBool DispatchEvent(nsGUIEvent* event);
static PRBool ConvertStatus(nsEventStatus aStatus);
virtual void BeginResizingChildren(void);
virtual void EndResizingChildren(void);
private:
Widget mWidget;
EVENT_CALLBACK mEventCallback;
nsIDeviceContext *mContext;
nsIFontMetrics *mFontMetrics;
nsToolkit *mToolkit;
nsIMouseListener * mMouseListener;
nsIEventListener * mEventListener;
nscolor mBackground;
nscolor mForeground;
nsCursor mCursor;
nsBorderStyle mBorderStyle;
};
//
// A child window is a window with different style
//
class ChildWindow : public nsWindow {
public:
ChildWindow(nsISupports *aOuter) : nsWindow(aOuter) {}
};
#define BASE_IWIDGET_IMPL BASE_INITIALIZE_IMPL BASE_WINDOWS_METHODS
#define BASE_INITIALIZE_IMPL \
void Create(nsIWidget *aParent, \
const nsRect &aRect, \
EVENT_CALLBACK aHandleEventFunction, \
nsIDeviceContext *aContext, \
nsIToolkit *aToolkit = nsnull, \
void *aInitData = nsnull) \
{ \
nsWindow::Create(aParent, aRect, aHandleEventFunction, aContext, aToolkit, aInitData); \
} \
#define BASE_WINDOWS_METHODS \
void Create(nsNativeWindow aParent, \
const nsRect &aRect, \
EVENT_CALLBACK aHandleEventFunction, \
nsIDeviceContext *aContext, \
nsIToolkit *aToolkit = nsnull, \
void *aInitData = nsnull) \
{ \
nsWindow::Create(aParent, aRect, aHandleEventFunction, aContext, aToolkit, aInitData); \
} \
void Destroy(void) \
{ \
nsWindow::Destroy(); \
} \
nsIWidget* GetParent(void) \
{ \
return nsWindow::GetParent(); \
} \
nsIEnumerator* GetChildren(void) \
{ \
return nsWindow::GetChildren(); \
} \
void AddChild(nsIWidget* aChild) \
{ \
nsWindow::AddChild(aChild); \
} \
void RemoveChild(nsIWidget* aChild) \
{ \
nsWindow::RemoveChild(aChild); \
} \
void Show(PRBool bState) \
{ \
nsWindow::Show(bState); \
} \
void Move(PRUint32 aX, PRUint32 aY) \
{ \
nsWindow::Move(aX, aY); \
} \
void Resize(PRUint32 aWidth, \
PRUint32 aHeight, \
PRBool aRepaint) \
{ \
nsWindow::Resize(aWidth, aHeight, aRepaint); \
} \
void Resize(PRUint32 aX, \
PRUint32 aY, \
PRUint32 aWidth, \
PRUint32 aHeight, \
PRBool aRepaint) \
{ \
nsWindow::Resize(aX, aY, aWidth, aHeight, aRepaint); \
} \
void Enable(PRBool bState) \
{ \
nsWindow::Enable(bState); \
} \
void SetFocus(void) \
{ \
nsWindow::SetFocus(); \
} \
void GetBounds(nsRect &aRect) \
{ \
nsWindow::GetBounds(aRect); \
} \
nscolor GetForegroundColor(void) \
{ \
return nsWindow::GetForegroundColor(); \
} \
void SetForegroundColor(const nscolor &aColor) \
{ \
nsWindow::SetForegroundColor(aColor); \
} \
nscolor GetBackgroundColor(void) \
{ \
return nsWindow::GetBackgroundColor(); \
} \
void SetBackgroundColor(const nscolor &aColor) \
{ \
nsWindow::SetBackgroundColor(aColor); \
} \
nsIFontMetrics* GetFont(void) \
{ \
return nsWindow::GetFont(); \
} \
void SetFont(const nsFont &aFont) \
{ \
nsWindow::SetFont(aFont); \
} \
nsCursor GetCursor() \
{ \
return nsWindow::GetCursor(); \
} \
void SetCursor(nsCursor aCursor) \
{ \
nsWindow::SetCursor(aCursor); \
} \
void Invalidate(PRBool aIsSynchronous) \
{ \
nsWindow::Invalidate(aIsSynchronous); \
} \
void* GetNativeData(PRUint32 aDataType) \
{ \
return nsWindow::GetNativeData(aDataType); \
} \
nsIRenderingContext* GetRenderingContext() \
{ \
return nsWindow::GetRenderingContext(); \
} \
nsIDeviceContext* GetDeviceContext() \
{ \
return nsWindow::GetDeviceContext(); \
} \
void Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect) \
{ \
nsWindow::Scroll(aDx, aDy, aClipRect); \
} \
nsIToolkit* GetToolkit() \
{ \
return nsWindow::GetToolkit(); \
} \
void SetColorMap(nsColorMap *aColorMap) \
{ \
nsWindow::SetColorMap(aColorMap); \
} \
void AddMouseListener(nsIMouseListener * aListener) \
{ \
nsWindow::AddMouseListener(aListener); \
} \
void AddEventListener(nsIEventListener * aListener) \
{ \
nsWindow::AddEventListener(aListener); \
} \
PRBool OnKey(PRUint32 aEventType, PRUint32 aKeyCode) \
{ \
return nsWindow::OnKey(aEventType, aKeyCode); \
} \
void SetBorderStyle(nsBorderStyle aBorderStyle) \
{ \
nsWindow::SetBorderStyle(aBorderStyle); \
} \
void SetTitle(const nsString& aTitle) \
{ \
nsWindow::SetTitle(aTitle); \
} \
void SetTooltips(PRUint32 aNumberOfTips,const nsRect* aTooltipAreas) \
{ \
nsWindow::SetTooltips(aNumberOfTips, aTooltipAreas); \
} \
void UpdateTooltips(const nsRect* aNewTips) \
{ \
nsWindow::UpdateTooltips(aNewTips); \
} \
void RemoveTooltips() \
{ \
nsWindow::RemoveTooltips(); \
} \
void WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect) \
{ \
nsWindow::WidgetToScreen(aOldRect, aNewRect); \
} \
void ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect) \
{ \
nsWindow::ScreenToWidget(aOldRect, aNewRect); \
}
#endif // Window_h__

View File

@@ -0,0 +1,62 @@
/* -*- 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 "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.
*/
#include "Xm/Xm.h"
#include "nsXtEventHandler.h"
#include "nsWindow.h"
#include "stdio.h"
void nsXtWidget_ExposureMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b)
{
nsPaintEvent pevent ;
nsWindow * widgetWindow = (nsWindow *) p ;
if (event->xexpose.count != 0)
return ;
pevent.widget = widgetWindow;
pevent.point.x = event->xbutton.x;
pevent.point.y = event->xbutton.y;
pevent.time = 0; // XXX TBD...
pevent.message = NS_PAINT ;
widgetWindow->OnPaint(pevent);
}
void nsXtWidget_ButtonPressMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b)
{
nsWindow * widgetWindow = (nsWindow *) p;
}
void nsXtWidget_ButtonReleaseMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b)
{
nsWindow * widgetWindow = (nsWindow *) p ;
}
void nsXtWidget_ButtonMotionMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b)
{
nsWindow * widgetWindow = (nsWindow *) p ;
}

View File

@@ -0,0 +1,34 @@
/* -*- 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 "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.
*/
#ifndef __nsXtEventHandler_h
#define __nsXtEventHandler_h
#include "Xm/Xm.h"
void nsXtWidget_ExposureMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b);
void nsXtWidget_ButtonPressMask_EventHandler(Widget w,XtPointer p, XEvent * event, Boolean * b);
void nsXtWidget_ButtonReleaseMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b);
void nsXtWidget_ButtonMotionMask_EventHandler(Widget w, XtPointer p, XEvent * event, Boolean * b);
#endif // __nsXtEventHandler.h