Forked from jboone/kicad-boost-polygon-sort-adaptor.patch
Last active
October 31, 2019 22:31
-
-
Save yoneken/3605799 to your computer and use it in GitHub Desktop.
KiCAD and wxWidgets patches to build on Mac OS X and add jboone's hacked-in "magnify" touchpad support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'common/drawpanel.cpp' | |
--- common/drawpanel.cpp 2013-02-21 20:53:50 +0000 | |
+++ common/drawpanel.cpp 2013-09-02 15:14:40 +0000 | |
@@ -870,6 +870,42 @@ | |
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); | |
cmd.SetEventObject( this ); | |
+ int x, y; | |
+ GetViewStart( &x, &y ); | |
+ | |
+ int tmpX = x; | |
+ int tmpY = y; | |
+ | |
+ int delta_x = 0; | |
+ int delta_y = 0; | |
+ switch( event.GetWheelAxis() ) { | |
+ case wxMOUSE_WHEEL_HORIZONTAL: | |
+ delta_x = event.GetWheelRotation(); | |
+ break; | |
+ | |
+ case wxMOUSE_WHEEL_VERTICAL: | |
+ delta_y = event.GetWheelRotation(); | |
+ break; | |
+ | |
+ default: | |
+ event.Skip(); | |
+ return; | |
+ } | |
+ | |
+ x -= delta_x; | |
+ y -= delta_y; | |
+ | |
+ // NOTE: Copied from OnScroll(), above. Refactor!!! | |
+ double scale = GetParent()->GetScreen()->GetScalingFactor(); | |
+ | |
+ wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition(); | |
+ center.x += KiROUND( (double)(x - tmpX) / scale ); | |
+ center.y += KiROUND( (double)(y - tmpY) / scale ); | |
+ GetParent()->GetScreen()->SetScrollCenterPosition( center ); | |
+ | |
+ Scroll(x, y); | |
+ | |
+ /* | |
// This is a zoom in or out command | |
if( event.GetWheelRotation() > 0 ) | |
{ | |
@@ -896,6 +932,7 @@ | |
} | |
GetEventHandler()->ProcessEvent( cmd ); | |
+ */ | |
event.Skip(); | |
} | |
@@ -924,7 +961,7 @@ | |
else | |
return; | |
- if( !event.IsButton() && !event.Moving() && !event.Dragging() ) | |
+ if( !event.IsButton() && !event.Moving() && !event.Dragging() && !event.Magnify() ) | |
return; | |
if( event.RightDown() ) | |
@@ -1022,7 +1059,28 @@ | |
CrossHairOff( &dc ); | |
} | |
- if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) && m_enableMiddleButtonPan ) | |
+ if( event.Magnify() ) | |
+ { | |
+ //const wxPoint current_position = event.GetPosition(); | |
+ const wxPoint cursor_position = GetParent()->GetScreen()->GetCursorPosition(false); | |
+ | |
+ const double current_scaling_factor = GetZoom(); | |
+ const float magnification_factor = (event.GetMagnification() + 1.0f); | |
+ wxLogDebug("magnification: %f", magnification_factor); | |
+ const double new_scaling_factor = current_scaling_factor / magnification_factor; | |
+ SetZoom(new_scaling_factor); | |
+ | |
+ GetParent()->RedrawScreen(cursor_position, false); | |
+ //GetParent()->GetScreen()->SetScrollCenterPosition(cursor_position); | |
+ | |
+ MoveCursorToCrossHair(); | |
+ //Refresh(); | |
+ //Update(); | |
+ | |
+ return; | |
+ } | |
+ | |
+ if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) && m_enableMiddleButtonPan ) | |
{ | |
INSTALL_UNBUFFERED_DC( dc, this ); | |
CrossHairOn( &dc ); | |
=== modified file 'include/common.h' | |
--- include/common.h 2013-03-30 12:54:49 +0000 | |
+++ include/common.h 2013-09-02 15:35:44 +0000 | |
@@ -111,6 +111,10 @@ | |
# endif | |
#endif | |
+static inline int KiROUND( double v ) | |
+{ | |
+ return int( v < 0 ? v - 0.5 : v + 0.5 ); | |
+} | |
// Graphic Texts Orientation in 0.1 degree | |
#define TEXT_ORIENT_HORIZ 0 | |
@@ -130,14 +134,14 @@ | |
*/ | |
#if !defined( DEBUG ) | |
- | |
+/* | |
/// KiROUND: a function so v is not evaluated twice. Unfortunately, compiler | |
/// is unable to pre-compute constants using this. | |
static inline int KiROUND( double v ) | |
{ | |
return int( v < 0 ? v - 0.5 : v + 0.5 ); | |
} | |
- | |
+*/ | |
/// KIROUND: a macro so compiler can pre-compute constants. Use this with compile | |
/// time constants rather than the inline function above. | |
#define KIROUND( v ) int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 ) | |
=== removed directory 'packaging/mac-osx/dmg-generator' | |
=== removed file 'packaging/mac-osx/dmg-generator/AdiumApplescriptRunner' | |
Binary files packaging/mac-osx/dmg-generator/AdiumApplescriptRunner 2010-01-16 18:46:38 +0000 and packaging/mac-osx/dmg-generator/AdiumApplescriptRunner 1970-01-01 00:00:00 +0000 differ | |
=== removed directory 'packaging/mac-osx/dmg-generator/Artwork' | |
=== removed file 'packaging/mac-osx/dmg-generator/Artwork/Anonymous_aiga_left_arrow.svg' | |
--- packaging/mac-osx/dmg-generator/Artwork/Anonymous_aiga_left_arrow.svg 2010-01-16 18:46:38 +0000 | |
+++ packaging/mac-osx/dmg-generator/Artwork/Anonymous_aiga_left_arrow.svg 1970-01-01 00:00:00 +0000 | |
@@ -1,54 +0,0 @@ | |
-<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
-<svg height="360.609" id="svg3578" inkscape:version="0.41" sodipodi:docbase="/datas/Projs/Cliparts Stocker/tmp/AIGA" sodipodi:docname="AIGA_Left_Arrow_1.svg" sodipodi:version="0.32" width="431.322" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"> | |
- <metadata> | |
- <rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | |
- <cc:Work rdf:about=""> | |
- <dc:title>AIGA_Symbol_Signs</dc:title> | |
- <dc:description>EPS converted from http://aiga.org</dc:description> | |
- <dc:subject> | |
- <rdf:Bag> | |
- <rdf:li>symbol</rdf:li> | |
- <rdf:li>mapsym</rdf:li> | |
- </rdf:Bag> | |
- </dc:subject> | |
- <dc:publisher> | |
- <cc:Agent rdf:about="http://www.openclipart.org/"> | |
- <dc:title>Open Clip Art Library</dc:title> | |
- </cc:Agent> | |
- </dc:publisher> | |
- <dc:creator> | |
- <cc:Agent> | |
- <dc:title>Jean-Victor Balin</dc:title> | |
- </cc:Agent> | |
- </dc:creator> | |
- <dc:rights> | |
- <cc:Agent> | |
- <dc:title>Jean-Victor Balin</dc:title> | |
- </cc:Agent> | |
- </dc:rights> | |
- <dc:date/> | |
- <dc:format>image/svg+xml</dc:format> | |
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> | |
- <cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/> | |
- <dc:language>en</dc:language> | |
- </cc:Work> | |
- <cc:License rdf:about="http://web.resource.org/cc/PublicDomain"> | |
- <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/> | |
- <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/> | |
- <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/> | |
- </cc:License> | |
- </rdf:RDF> | |
- </metadata> | |
- <sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="svg3578" inkscape:cx="305.25953" inkscape:cy="417.84947" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="543" inkscape:window-width="640" inkscape:window-x="5" inkscape:window-y="70" inkscape:zoom="0.43415836" pagecolor="#ffffff"/> | |
- <defs id="defs3580"> | |
- <marker id="ArrowEnd" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="0" refY="5" viewBox="0 0 10 10"> | |
- <path d="M 0 0 L 10 5 L 0 10 z" id="path3583"/> | |
- </marker> | |
- <marker id="ArrowStart" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="10" refY="5" viewBox="0 0 10 10"> | |
- <path d="M 10 0 L 0 5 L 10 10 z" id="path3586"/> | |
- </marker> | |
- </defs> | |
- <g id="g3588"> | |
- <path d="M 180.199 360.396L 0 180.197L 180.199 0L 299.048 0L 161.988 137.066L 431.322 137.066L 431.322 224.288L 162.946 224.288L 299.263 360.609L 180.199 360.396z" id="path3590" style="stroke: none; fill: rgb(0, 0, 0);"/> | |
- </g> | |
-</svg> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/dmg-generator/Artwork/dmgBackground.png' | |
Binary files packaging/mac-osx/dmg-generator/Artwork/dmgBackground.png 2010-01-16 18:46:38 +0000 and packaging/mac-osx/dmg-generator/Artwork/dmgBackground.png 1970-01-01 00:00:00 +0000 differ | |
=== removed file 'packaging/mac-osx/dmg-generator/Artwork/dmgBackground.svg' | |
--- packaging/mac-osx/dmg-generator/Artwork/dmgBackground.svg 2010-01-16 18:46:38 +0000 | |
+++ packaging/mac-osx/dmg-generator/Artwork/dmgBackground.svg 1970-01-01 00:00:00 +0000 | |
@@ -1,196 +0,0 @@ | |
-<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
-<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
- | |
-<svg | |
- xmlns:dc="http://purl.org/dc/elements/1.1/" | |
- xmlns:cc="http://creativecommons.org/ns#" | |
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
- xmlns:svg="http://www.w3.org/2000/svg" | |
- xmlns="http://www.w3.org/2000/svg" | |
- xmlns:xlink="http://www.w3.org/1999/xlink" | |
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
- version="1.1" | |
- width="600" | |
- height="400" | |
- id="svg2826" | |
- inkscape:version="0.47pre2 r22153" | |
- sodipodi:docname="dmgBackground.svg" | |
- inkscape:export-filename="/Users/jerry/Repositories/kicad/kicad/packaging/mac-osx/Artwork/dmgBackground.png" | |
- inkscape:export-xdpi="90" | |
- inkscape:export-ydpi="90"> | |
- <metadata | |
- id="metadata3059"> | |
- <rdf:RDF> | |
- <cc:Work | |
- rdf:about=""> | |
- <dc:format>image/svg+xml</dc:format> | |
- <dc:type | |
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
- <dc:title></dc:title> | |
- </cc:Work> | |
- </rdf:RDF> | |
- </metadata> | |
- <sodipodi:namedview | |
- pagecolor="#ffffff" | |
- bordercolor="#666666" | |
- borderopacity="1" | |
- objecttolerance="10" | |
- gridtolerance="10" | |
- guidetolerance="10" | |
- inkscape:pageopacity="0" | |
- inkscape:pageshadow="2" | |
- inkscape:window-width="1280" | |
- inkscape:window-height="706" | |
- id="namedview3057" | |
- showgrid="false" | |
- inkscape:zoom="1.52" | |
- inkscape:cx="238.73307" | |
- inkscape:cy="136.65089" | |
- inkscape:window-x="0" | |
- inkscape:window-y="0" | |
- inkscape:window-maximized="1" | |
- inkscape:current-layer="svg2826" /> | |
- <defs | |
- id="defs2828"> | |
- <inkscape:perspective | |
- sodipodi:type="inkscape:persp3d" | |
- inkscape:vp_x="0 : 200 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_z="600 : 200 : 1" | |
- inkscape:persp3d-origin="300 : 133.33333 : 1" | |
- id="perspective3061" /> | |
- <linearGradient | |
- id="linearGradient5348"> | |
- <stop | |
- id="stop5350" | |
- style="stop-color:#000000;stop-opacity:1" | |
- offset="0" /> | |
- <stop | |
- id="stop5352" | |
- style="stop-color:#000000;stop-opacity:0" | |
- offset="1" /> | |
- </linearGradient> | |
- <linearGradient | |
- x1="201.60388" | |
- y1="60.693924" | |
- x2="631.60358" | |
- y2="60.693924" | |
- id="linearGradient5356" | |
- xlink:href="#linearGradient5348" | |
- gradientUnits="userSpaceOnUse" /> | |
- <inkscape:perspective | |
- id="perspective181503" | |
- inkscape:persp3d-origin="478.34647 : 224.40944 : 1" | |
- inkscape:vp_z="956.69293 : 336.61417 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_x="0 : 336.61417 : 1" | |
- sodipodi:type="inkscape:persp3d" /> | |
- <inkscape:perspective | |
- id="perspective550892" | |
- inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | |
- inkscape:vp_z="1 : 0.5 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_x="0 : 0.5 : 1" | |
- sodipodi:type="inkscape:persp3d" /> | |
- <inkscape:perspective | |
- id="perspective550919" | |
- inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | |
- inkscape:vp_z="1 : 0.5 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_x="0 : 0.5 : 1" | |
- sodipodi:type="inkscape:persp3d" /> | |
- <inkscape:perspective | |
- id="perspective3781" | |
- inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | |
- inkscape:vp_z="1 : 0.5 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_x="0 : 0.5 : 1" | |
- sodipodi:type="inkscape:persp3d" /> | |
- <marker | |
- viewBox="0 0 10 10" | |
- refY="5" | |
- refX="10" | |
- orient="auto" | |
- markerWidth="4" | |
- markerUnits="strokeWidth" | |
- markerHeight="3" | |
- id="ArrowStart"> | |
- <path | |
- id="path3586" | |
- d="M 10 0 L 0 5 L 10 10 z" /> | |
- </marker> | |
- <marker | |
- viewBox="0 0 10 10" | |
- refY="5" | |
- refX="0" | |
- orient="auto" | |
- markerWidth="4" | |
- markerUnits="strokeWidth" | |
- markerHeight="3" | |
- id="ArrowEnd"> | |
- <path | |
- id="path3583" | |
- d="M 0 0 L 10 5 L 0 10 z" /> | |
- </marker> | |
- <inkscape:perspective | |
- id="perspective3885" | |
- inkscape:persp3d-origin="215.661 : 120.203 : 1" | |
- inkscape:vp_z="431.32199 : 180.3045 : 1" | |
- inkscape:vp_y="0 : 1000 : 0" | |
- inkscape:vp_x="0 : 180.3045 : 1" | |
- sodipodi:type="inkscape:persp3d" /> | |
- </defs> | |
- <image | |
- sodipodi:absref="/Applications/Inkscape.app/inkscape_pasted_image_20100116_171239.png" | |
- y="-18.414894" | |
- x="-113.0907" | |
- id="image550894" | |
- height="642" | |
- width="889" | |
- xlink:href="/Applications/Inkscape.app/inkscape_pasted_image_20100116_171239.png" | |
- style="opacity:0.67901234" | |
- inkscape:export-xdpi="90" | |
- inkscape:export-ydpi="90" /> | |
- <g | |
- transform="translate(0,-200)" | |
- id="layer1"> | |
- <text | |
- x="83.225609" | |
- y="267.271" | |
- transform="scale(1.0020366,0.99796753)" | |
- id="text2836" | |
- xml:space="preserve" | |
- style="font-size:55.88646698px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#8f8f8f;fill-opacity:1;stroke:#000000;stroke-width:0.99797261;stroke-opacity:1;font-family:Chalkboard;-inkscape-font-specification:Bitstream Vera Sans Bold"><tspan | |
- x="83.225609" | |
- y="267.271" | |
- id="tspan2838" | |
- style="fill:#8f8f8f;fill-opacity:1;stroke:#000000;stroke-width:0.99797261;stroke-opacity:1">KiCad EDA Suite</tspan></text> | |
- </g> | |
- <rect | |
- style="opacity:0.77800000000000002;fill:#8f8f8f;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | |
- id="rect3811" | |
- width="221.02962" | |
- height="132.76646" | |
- x="40.985184" | |
- y="101.25256" | |
- rx="1.0058786" | |
- ry="0.37196189" /> | |
- <rect | |
- style="opacity:0.778;fill:#8f8f8f;fill-opacity:1;stroke:#000000;stroke-width:2.11835647;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | |
- id="rect3813" | |
- width="89.881645" | |
- height="79.88163" | |
- x="109.05918" | |
- y="299.05923" | |
- rx="1.1279253" | |
- ry="0.38347483" /> | |
- <g | |
- id="g3588" | |
- transform="matrix(0,-0.1247889,0.1247889,0,128.5,294.01714)"> | |
- <path | |
- style="fill:#000000;stroke:none" | |
- id="path3590" | |
- d="M 180.199,360.396 0,180.197 180.199,0 l 118.849,0 -137.06,137.066 269.334,0 0,87.222 -268.376,0 136.317,136.321 -119.064,-0.213 z" /> | |
- </g> | |
-</svg> | |
=== removed file 'packaging/mac-osx/dmg-generator/Makefile' | |
--- packaging/mac-osx/dmg-generator/Makefile 2010-05-16 18:18:38 +0000 | |
+++ packaging/mac-osx/dmg-generator/Makefile 1970-01-01 00:00:00 +0000 | |
@@ -1,40 +0,0 @@ | |
-########### | |
-# KiCad OSX DMG packaging | |
-# Create a bin directory and copy the .app files in | |
-# Create a build directory | |
-# Then execute the makefile | |
-# | |
-# Original credits by Adium developers ! | |
-# http://www.adium.im | |
-########### | |
-VERSION=`date +%Y%m%d` | |
- | |
-########### | |
-# Variables | |
-########### | |
-BUILD_DIR=build | |
-APP_DIR=release | |
-KICAD_DIR=$(BUILD_DIR) | |
-RELEASE_NAME=kicad-$(VERSION) | |
- | |
-########### | |
-# Targets | |
-########### | |
-all: | |
- echo "Copying application bundles" | |
- mkdir release | |
- cp -R ../../../*/*.app release | |
- echo "Building kicad-${VERSION}.dmg" | |
- rm -rfv build | |
- mkdir build | |
- | |
- cp -r $(APP_DIR)/* $(BUILD_DIR) | |
- mkdir -p $(BUILD_DIR)/.background | |
- cp Artwork/dmgBackground.png $(BUILD_DIR)/.background | |
- ./mkalias -r /Applications $(BUILD_DIR)/Applications | |
- | |
- mkdir -p $(BUILD_DIR)/.background | |
- | |
- ./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(KICAD_DIR) "KiCad" dmg_kicad.scpt $(ART_DIR) | |
- | |
- @echo "Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg`" | |
=== removed file 'packaging/mac-osx/dmg-generator/RightDS_Store' | |
Binary files packaging/mac-osx/dmg-generator/RightDS_Store 2010-01-16 18:46:38 +0000 and packaging/mac-osx/dmg-generator/RightDS_Store 1970-01-01 00:00:00 +0000 differ | |
=== removed file 'packaging/mac-osx/dmg-generator/dmg_kicad.scpt' | |
Binary files packaging/mac-osx/dmg-generator/dmg_kicad.scpt 2010-05-16 18:18:38 +0000 and packaging/mac-osx/dmg-generator/dmg_kicad.scpt 1970-01-01 00:00:00 +0000 differ | |
=== removed file 'packaging/mac-osx/dmg-generator/make-diskimage.sh' | |
--- packaging/mac-osx/dmg-generator/make-diskimage.sh 2010-01-16 18:46:38 +0000 | |
+++ packaging/mac-osx/dmg-generator/make-diskimage.sh 1970-01-01 00:00:00 +0000 | |
@@ -1,78 +0,0 @@ | |
-# Create a read-only disk image of the contents of a folder | |
-# | |
-# Usage: make-diskimage <image_file> | |
-# <src_folder> | |
-# <volume_name> | |
-# <applescript> | |
-# <artpath> | |
-# <eula_resource_file> | |
- | |
-set -e; | |
- | |
-DMG_DIRNAME=`dirname $1` | |
-DMG_DIR=`cd $DMG_DIRNAME > /dev/null; pwd` | |
-DMG_NAME=`basename $1` | |
-DMG_TEMP_NAME=${DMG_DIR}/rw.${DMG_NAME} | |
-SRC_FOLDER=`cd $2 > /dev/null; pwd` | |
-VOLUME_NAME=$3 | |
- | |
-# optional arguments | |
-APPLESCRIPT=$4 | |
-ART_PATH=$5 | |
-EULA_RSRC=$6 | |
- | |
-# Create the image | |
-echo "Creating disk image..." | |
-rm -f "${DMG_TEMP_NAME}" | |
-hdiutil create -srcfolder "${SRC_FOLDER}" -volname "${VOLUME_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${DMG_TEMP_NAME}" | |
- | |
-# mount it | |
-echo "Mounting disk image..." | |
-MOUNT_DIR="/Volumes/${VOLUME_NAME}" | |
-DEV_NAME=`hdiutil attach -readwrite -noverify -noautoopen "${DMG_TEMP_NAME}" | egrep '^/dev/' | sed 1q | awk '{print $1}'` | |
- | |
-cp RightDS_Store "/Volumes/${VOLUME_NAME}/.DS_Store" | |
- | |
-# run applescript | |
-if [ ! -z "${APPLESCRIPT}" -a "${APPLESCRIPT}" != "-null-" ]; then | |
-# osascript "${APPLESCRIPT}" | |
- # pass the applescript our volume name and our artwork path, to its process_disk_image function | |
- echo "Running Applescript: ./AdiumApplescriptRunner \"${APPLESCRIPT}\" process_disk_image \"${VOLUME_NAME}\"" | |
- ./AdiumApplescriptRunner "${APPLESCRIPT}" process_disk_image "${VOLUME_NAME}" "${ART_PATH}" || true | |
- echo "Done running the applescript..." | |
-fi | |
- | |
- | |
-# run shell script | |
-# if [ ! -z "${SHELLSCRIPT}" -a "${SHELLSCRIPT}" != "-null-" ]; then | |
-# ./${SHELLSCRIPT} \"${VOLUME_NAME}\" | |
-# fi | |
- | |
-# make sure it's not world writeable | |
-echo "Fixing permissions..." | |
-chmod -Rf go-w "${MOUNT_DIR}" || true | |
- | |
-# make the top window open itself on mount: | |
-if [ -x /usr/local/bin/openUp ]; then | |
- /usr/local/bin/openUp "${MOUNT_DIR}" | |
-fi | |
- | |
-# unmount | |
-echo "Unmounting disk image..." | |
-hdiutil detach "${DEV_NAME}" | |
- | |
-# compress image | |
-echo "Compressing disk image..." | |
-hdiutil convert "${DMG_TEMP_NAME}" -format UDBZ -o "${DMG_DIR}/${DMG_NAME}" | |
-rm -f "${DMG_TEMP_NAME}" | |
- | |
-# adding EULA resources | |
-if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then | |
- echo "adding EULA resources" | |
- hdiutil unflatten "${DMG_DIR}/${DMG_NAME}" | |
- /Developer/Tools/ResMerger -a "${EULA_RSRC}" -o "${DMG_DIR}/${DMG_NAME}" | |
- hdiutil flatten "${DMG_DIR}/${DMG_NAME}" | |
-fi | |
- | |
-echo "Disk image done" | |
-exit 0 | |
=== removed file 'packaging/mac-osx/dmg-generator/mkalias' | |
Binary files packaging/mac-osx/dmg-generator/mkalias 2010-01-16 18:46:38 +0000 and packaging/mac-osx/dmg-generator/mkalias 1970-01-01 00:00:00 +0000 differ | |
=== removed directory 'packaging/mac-osx/osx-package.pmdoc' | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/01kicad-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/01kicad-contents.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/01kicad-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="kicad.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/kicad/kicad.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="kicad" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="kicad.icns" o="marco" g="staff" p="33188"/><f n="kicad_doc.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/01kicad.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/01kicad.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/01kicad.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="E6FF1347-A729-4B59-AA3A-52F76A70705F"><config><identifier>net.sourceforge.kicad.kicad</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">../../kicad/kicad.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>01kicad-contents.xml</file-list><component id="org.kicad-eda.kicad" path="/Users/marco/Development/kicad/kicad/kicad/kicad.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-52"><search-rule><combo identifier="org.kicad-eda.kicad" default-path="/Applications/Kicad/kicad.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/02gerbview-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/02gerbview-contents.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/02gerbview-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="gerbview.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/gerbview/gerbview.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="gerbview" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="gerbview.icns" o="marco" g="staff" p="33188"/><f n="gerbview_doc.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/02gerbview.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/02gerbview.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/02gerbview.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="052237DB-F6F2-4879-B340-1F7FDFC6F7DB"><config><identifier>net.sourceforge.kicad.gerbview</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">../../gerbview/gerbview.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>02gerbview-contents.xml</file-list><component id="org.kicad-eda.gerbview" path="/Users/marco/Development/kicad/kicad/gerbview/gerbview.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-65"><search-rule><combo identifier="org.kicad-eda.gerbview" default-path="/Applications/Kicad/gerbview.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/03eeschema-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/03eeschema-contents.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/03eeschema-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="eeschema.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/eeschema/eeschema.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="eeschema" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="eeschema.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/03eeschema.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/03eeschema.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/03eeschema.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="80058898-14C5-49A3-A029-51772838B06A"><config><identifier>net.sourceforge.kicad.eeschema</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">../../eeschema/eeschema.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>03eeschema-contents.xml</file-list><component id="org.kicad-eda.eeschema" path="/Users/marco/Development/kicad/kicad/eeschema/eeschema.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-30"><search-rule><combo identifier="org.kicad-eda.eeschema" default-path="/Applications/Kicad/eeschema.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/04pcbnew-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/04pcbnew-contents.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/04pcbnew-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="pcbnew.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/pcbnew/pcbnew.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="pcbnew" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="pcbnew.icns" o="marco" g="staff" p="33188"/><f n="pcbnew_doc.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/04pcbnew.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/04pcbnew.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/04pcbnew.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="A8FF90DF-E294-48A7-B0BF-5B0427561E39"><config><identifier>net.sourceforge.kicad.pcbnew</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">../../pcbnew/pcbnew.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>04pcbnew-contents.xml</file-list><component id="org.kicad-eda.pcbnew" path="/Users/marco/Development/kicad/kicad/pcbnew/pcbnew.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-69"><search-rule><combo identifier="org.kicad-eda.pcbnew" default-path="/Applications/Kicad/pcbnew.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/05cvpcb-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/05cvpcb-contents.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/05cvpcb-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="cvpcb.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/cvpcb/cvpcb.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="cvpcb" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="cvpcb.icns" o="marco" g="staff" p="33188"/><f n="cvpcb_doc.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/05cvpcb.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/05cvpcb.xml 2010-09-19 10:51:35 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/05cvpcb.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="E8C63B60-3F92-42E1-B00D-B70F35BE08A5"><config><identifier>net.sourceforge.kicad.cvpcb</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">../../cvpcb/cvpcb.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>05cvpcb-contents.xml</file-list><component id="org.kicad-eda.cvpcb" path="/Users/marco/Development/kicad/kicad/cvpcb/cvpcb.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-73"><search-rule><combo identifier="org.kicad-eda.cvpcb" default-path="/Applications/Kicad/cvpcb.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml 2010-12-28 22:38:59 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkg-contents spec="1.12"><f n="bitmap2component.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="bitmap2component" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="bitmap2component.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/06bitmap.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/06bitmap.xml 2010-12-28 22:38:59 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/06bitmap.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkgref spec="1.12" uuid="7E583994-AFBA-404C-916F-A1DFE3A2B504"><config><identifier>net.sourceforge.kicad.kicad.bitmap2component.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom relative="true" includeRoot="true">../../bitmap2component/bitmap2component.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installFrom.isRelativeType</mod><mod>installTo.path</mod><mod>parent</mod><mod>installTo</mod></config><contents><file-list>06bitmap-contents.xml</file-list><component id="org.kicad-eda.bitmap2component" path="/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-16"><search-rule><combo identifier="org.kicad-eda.bitmap2component" default-path="/Applications/bitmap2component.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> | |
\ No newline at end of file | |
=== removed file 'packaging/mac-osx/osx-package.pmdoc/index.xml' | |
--- packaging/mac-osx/osx-package.pmdoc/index.xml 2010-12-28 22:38:59 +0000 | |
+++ packaging/mac-osx/osx-package.pmdoc/index.xml 1970-01-01 00:00:00 +0000 | |
@@ -1,1 +0,0 @@ | |
-<pkmkdoc spec="1.12"><properties><title>Kicad</title><build>/Users/marco/Development/Kicad-27-Dec-2010.mpkg</build><organization>net.sourceforge.kicad</organization><userSees ui="both"/><min-target os="2"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="kicad" id="choice12" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad"/></choice><choice title="gerbview" id="choice13" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.gerbview"/></choice><choice title="eeschema" id="choice14" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.eeschema"/></choice><choice title="pcbnew" id="choice15" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.pcbnew"/></choice><choice title="cvpcb" id="choice16" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.cvpcb"/></choice><choice title="bitmap2component" id="choice17" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad.bitmap2component.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="license">../../AUTHORS.txt</resource><resource relative="true" mod="true" type="readme">../../CHANGELOG.txt</resource></locale></resources><flags/><item type="file">01kicad.xml</item><item type="file">02gerbview.xml</item><item type="file">03eeschema.xml</item><item type="file">04pcbnew.xml</item><item type="file">05cvpcb.xml</item><item type="file">06bitmap.xml</item><mod>properties.title</mod><mod>properties.anywhereDomain</mod></pkmkdoc> | |
\ No newline at end of file | |
=== modified file 'pcbnew/CMakeLists.txt' | |
--- pcbnew/CMakeLists.txt 2013-01-23 16:35:40 +0000 | |
+++ pcbnew/CMakeLists.txt 2013-09-02 15:02:48 +0000 | |
@@ -371,8 +371,7 @@ | |
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h | |
-P ${CMAKE_MODULE_PATH}/Html2C.cmake | |
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html | |
- COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h | |
- from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html" | |
+ COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html" | |
) | |
set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Makefile.in | |
=================================================================== | |
--- Makefile.in (revision 72421) | |
+++ Makefile.in (working copy) | |
@@ -14376,7 +14376,7 @@ | |
monodll_carbon_frame.o \ | |
monodll_carbon_mdi.o \ | |
monodll_carbon_metafile.o \ | |
- monodll_carbon_overlay.o \ | |
+ monodll_osx_cocoa_overlay.o \ | |
monodll_carbon_popupwin.o \ | |
monodll_carbon_renderer.o \ | |
monodll_carbon_settings.o \ | |
@@ -14505,7 +14505,7 @@ | |
monolib_carbon_frame.o \ | |
monolib_carbon_mdi.o \ | |
monolib_carbon_metafile.o \ | |
- monolib_carbon_overlay.o \ | |
+ monolib_osx_cocoa_overlay.o \ | |
monolib_carbon_popupwin.o \ | |
monolib_carbon_renderer.o \ | |
monolib_carbon_settings.o \ | |
@@ -17465,6 +17465,9 @@ | |
monodll_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONODLL_ODEP) | |
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm | |
+monodll_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(MONODLL_ODEP) | |
+ $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm | |
+ | |
monodll_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONODLL_ODEP) | |
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm | |
@@ -23159,6 +23162,9 @@ | |
monolib_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONOLIB_ODEP) | |
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm | |
+monolib_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(MONOLIB_ODEP) | |
+ $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm | |
+ | |
monolib_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONOLIB_ODEP) | |
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm | |
Index: src/osx/cocoa/overlay.mm | |
=================================================================== | |
--- src/osx/cocoa/overlay.mm (revision 72421) | |
+++ src/osx/cocoa/overlay.mm (working copy) | |
@@ -35,6 +35,7 @@ | |
#include "wx/private/overlay.h" | |
#ifdef wxHAS_NATIVE_OVERLAY | |
+#import <Foundation/NSGeometry.h> | |
// ============================================================================ | |
// implementation | |
@@ -59,48 +60,6 @@ | |
void wxOverlayImpl::CreateOverlayWindow() | |
{ | |
- if ( m_window ) | |
- { | |
- m_overlayParentWindow = m_window->MacGetTopLevelWindowRef(); | |
- [m_overlayParentWindow makeKeyAndOrderFront:nil]; | |
- | |
- NSView* view = m_window->GetHandle(); | |
- | |
- NSPoint viewOriginBase, viewOriginScreen; | |
- viewOriginBase = [view convertPoint:NSMakePoint(0, 0) toView:nil]; | |
- viewOriginScreen = [m_overlayParentWindow convertBaseToScreen:viewOriginBase]; | |
- | |
- NSSize viewSize = [view frame].size; | |
- if ( [view isFlipped] ) | |
- viewOriginScreen.y -= viewSize.height; | |
- | |
- m_overlayWindow=[[NSWindow alloc] initWithContentRect:NSMakeRect(viewOriginScreen.x,viewOriginScreen.y, | |
- viewSize.width, | |
- viewSize.height) | |
- styleMask:NSBorderlessWindowMask | |
- backing:NSBackingStoreBuffered | |
- defer:YES]; | |
- | |
- [m_overlayParentWindow addChildWindow:m_overlayWindow ordered:NSWindowAbove]; | |
- } | |
- else | |
- { | |
- m_overlayParentWindow = NULL ; | |
- CGRect cgbounds ; | |
- cgbounds = CGDisplayBounds(CGMainDisplayID()); | |
- | |
- m_overlayWindow=[[NSWindow alloc] initWithContentRect:NSMakeRect(cgbounds.origin.x,cgbounds.origin.y, | |
- cgbounds.size.width, | |
- cgbounds.size.height) | |
- styleMask:NSBorderlessWindowMask | |
- backing:NSBackingStoreBuffered | |
- defer:YES]; | |
- } | |
- [m_overlayWindow setOpaque:NO]; | |
- [m_overlayWindow setIgnoresMouseEvents:YES]; | |
- [m_overlayWindow setAlphaValue:1.0]; | |
- | |
- [m_overlayWindow orderFront:nil]; | |
} | |
void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) | |
@@ -108,69 +67,37 @@ | |
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") ); | |
m_window = dc->GetWindow(); | |
- m_x = x ; | |
- m_y = y ; | |
- if ( dc->IsKindOf( CLASSINFO( wxClientDC ) )) | |
- { | |
- wxPoint origin = m_window->GetClientAreaOrigin(); | |
- m_x += origin.x; | |
- m_y += origin.y; | |
- } | |
- m_width = width ; | |
- m_height = height ; | |
+ m_overlayWindow = m_window->MacGetTopLevelWindowRef(); | |
- CreateOverlayWindow(); | |
- wxASSERT_MSG( m_overlayWindow != NULL , _("Couldn't create the overlay window") ); | |
- m_overlayContext = (CGContextRef) [[m_overlayWindow graphicsContext] graphicsPort]; | |
- wxASSERT_MSG( m_overlayContext != NULL , _("Couldn't init the context on the overlay window") ); | |
+ NSRect box = [m_overlayWindow frame]; | |
- int ySize = 0; | |
- if ( m_window ) | |
+ if( [m_overlayWindow isVisible] ) | |
{ | |
- NSView* view = m_window->GetHandle(); | |
- NSSize viewSize = [view frame].size; | |
- ySize = viewSize.height; | |
+ [m_overlayWindow discardCachedImage]; | |
+ [m_overlayWindow cacheImageInRect:box]; | |
} | |
- else | |
- { | |
- CGRect cgbounds ; | |
- cgbounds = CGDisplayBounds(CGMainDisplayID()); | |
- ySize = cgbounds.size.height; | |
- | |
- | |
- | |
- } | |
- CGContextTranslateCTM( m_overlayContext, 0, ySize ); | |
- CGContextScaleCTM( m_overlayContext, 1, -1 ); | |
- CGContextTranslateCTM( m_overlayContext, -m_x , -m_y ); | |
} | |
void wxOverlayImpl::BeginDrawing( wxDC* dc) | |
{ | |
- wxDCImpl *impl = dc->GetImpl(); | |
- wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl); | |
- if (win_impl) | |
- { | |
- win_impl->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) ); | |
- dc->SetClippingRegion( m_x , m_y , m_width , m_height ) ; | |
- } | |
} | |
void wxOverlayImpl::EndDrawing( wxDC* dc) | |
{ | |
- wxDCImpl *impl = dc->GetImpl(); | |
- wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl); | |
- if (win_impl) | |
- win_impl->SetGraphicsContext(NULL); | |
- | |
- CGContextFlush( m_overlayContext ); | |
} | |
void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc)) | |
{ | |
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") ); | |
- CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 ); | |
- CGContextClearRect( m_overlayContext, box ); | |
+ m_overlayWindow = m_window->MacGetTopLevelWindowRef(); | |
+ | |
+ NSRect box = [m_overlayWindow frame]; | |
+ | |
+ if( [m_overlayWindow isVisible] ) | |
+ { | |
+ [m_overlayWindow discardCachedImage]; | |
+ [m_overlayWindow cacheImageInRect:box]; | |
+ } | |
} | |
void wxOverlayImpl::Reset() | |
@@ -181,11 +108,11 @@ | |
} | |
// todo : don't dispose, only hide and reposition on next run | |
- if (m_overlayWindow) | |
+ if (m_overlayWindow && [m_overlayWindow isVisible]) | |
{ | |
- [m_overlayParentWindow removeChildWindow:m_overlayWindow]; | |
- [m_overlayWindow release]; | |
- m_overlayWindow = NULL ; | |
+ NSRect box = [m_overlayWindow frame]; | |
+ [m_overlayWindow discardCachedImage]; | |
+ [m_overlayWindow cacheImageInRect:box]; | |
} | |
} | |
Index: include/wx/overlay.h | |
=================================================================== | |
--- include/wx/overlay.h (revision 72421) | |
+++ include/wx/overlay.h (working copy) | |
@@ -14,7 +14,7 @@ | |
#include "wx/defs.h" | |
-#if defined(__WXMAC__) && wxOSX_USE_CARBON | |
+#if defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON | |
#define wxHAS_NATIVE_OVERLAY 1 | |
#elif defined(__WXDFB__) | |
#define wxHAS_NATIVE_OVERLAY 1 | |
Index: include/wx/private/overlay.h | |
=================================================================== | |
--- include/wx/private/overlay.h (revision 72421) | |
+++ include/wx/private/overlay.h (working copy) | |
@@ -17,7 +17,11 @@ | |
#ifdef wxHAS_NATIVE_OVERLAY | |
#if defined(__WXMAC__) | |
- #include "wx/osx/carbon/private/overlay.h" | |
+#if wxOSX_USE_CARBON | |
+ #include "wx/osx/carbon/private/overlay.h" | |
+#else | |
+ #include "wx/osx/cocoa/private/overlay.h" | |
+#endif | |
#elif defined(__WXDFB__) | |
#include "wx/dfb/private/overlay.h" | |
#else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/common/event.cpp | |
=================================================================== | |
--- src/common/event.cpp (revision 72421) | |
+++ src/common/event.cpp (working copy) | |
@@ -207,6 +207,7 @@ | |
wxDEFINE_EVENT( wxEVT_AUX2_DOWN, wxMouseEvent ); | |
wxDEFINE_EVENT( wxEVT_AUX2_UP, wxMouseEvent ); | |
wxDEFINE_EVENT( wxEVT_AUX2_DCLICK, wxMouseEvent ); | |
+wxDEFINE_EVENT( wxEVT_MAGNIFY, wxMouseEvent ); | |
// Character input event type | |
wxDEFINE_EVENT( wxEVT_CHAR, wxKeyEvent ); | |
@@ -558,6 +559,8 @@ | |
m_wheelRotation = 0; | |
m_wheelDelta = 0; | |
m_linesPerAction = 0; | |
+ | |
+ m_magnification = 0.0f; | |
} | |
void wxMouseEvent::Assign(const wxMouseEvent& event) | |
@@ -581,6 +584,8 @@ | |
m_wheelDelta = event.m_wheelDelta; | |
m_linesPerAction = event.m_linesPerAction; | |
m_wheelAxis = event.m_wheelAxis; | |
+ | |
+ m_magnification = event.m_magnification; | |
} | |
// return true if was a button dclick event | |
Index: src/osx/cocoa/window.mm | |
=================================================================== | |
--- src/osx/cocoa/window.mm (revision 72421) | |
+++ src/osx/cocoa/window.mm (working copy) | |
@@ -677,6 +677,10 @@ | |
case NSMouseMoved : | |
wxevent.SetEventType( wxEVT_MOTION ) ; | |
break; | |
+ case NSEventTypeMagnify: | |
+ wxevent.SetEventType( wxEVT_MAGNIFY ); | |
+ wxevent.m_magnification = [nsEvent magnification]; | |
+ break; | |
default : | |
break ; | |
} | |
@@ -1506,6 +1510,10 @@ | |
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseEntered:), (IMP) wxOSX_mouseEvent, "v@:@" ) | |
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseExited:), (IMP) wxOSX_mouseEvent, "v@:@" ) | |
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 | |
+ wxOSX_CLASS_ADD_METHOD(c, @selector(magnifyWithEvent:), (IMP)wxOSX_mouseEvent, "v@:@") | |
+#endif | |
+ | |
wxOSX_CLASS_ADD_METHOD(c, @selector(cursorUpdate:), (IMP) wxOSX_cursorUpdate, "v@:@" ) | |
wxOSX_CLASS_ADD_METHOD(c, @selector(keyDown:), (IMP) wxOSX_keyEvent, "v@:@" ) | |
Index: include/wx/event.h | |
=================================================================== | |
--- include/wx/event.h (revision 72421) | |
+++ include/wx/event.h (working copy) | |
@@ -707,6 +707,7 @@ | |
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DOWN, wxMouseEvent); | |
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_UP, wxMouseEvent); | |
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DCLICK, wxMouseEvent); | |
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MAGNIFY, wxMouseEvent); | |
// Character input event type | |
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR, wxKeyEvent); | |
@@ -1503,6 +1504,8 @@ | |
bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_DCLICK); } | |
bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_DCLICK); } | |
+ bool Magnify() const { return (m_eventType == wxEVT_MAGNIFY); } | |
+ | |
// True if a button is down and the mouse is moving | |
bool Dragging() const | |
{ | |
@@ -1553,6 +1556,8 @@ | |
// Is the system set to do page scrolling? | |
bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); } | |
+ float GetMagnification() const { return m_magnification; } | |
+ | |
virtual wxEvent *Clone() const { return new wxMouseEvent(*this); } | |
virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } | |
@@ -1571,6 +1576,8 @@ | |
int m_wheelDelta; | |
int m_linesPerAction; | |
+ float m_magnification; | |
+ | |
protected: | |
void Assign(const wxMouseEvent& evt); | |
@@ -3895,6 +3902,7 @@ | |
#define EVT_MOUSE_AUX2_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX2_DOWN, wxMouseEventHandler(func)) | |
#define EVT_MOUSE_AUX2_UP(func) wx__DECLARE_EVT0(wxEVT_AUX2_UP, wxMouseEventHandler(func)) | |
#define EVT_MOUSE_AUX2_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX2_DCLICK, wxMouseEventHandler(func)) | |
+#define EVT_MAGNIFY(func) wx__DECLARE_EVT0(wxEVT_MAGNIFY, wxMouseEventHandler(func)) | |
// All mouse events | |
#define EVT_MOUSE_EVENTS(func) \ | |
@@ -3916,7 +3924,8 @@ | |
EVT_MOTION(func) \ | |
EVT_LEAVE_WINDOW(func) \ | |
EVT_ENTER_WINDOW(func) \ | |
- EVT_MOUSEWHEEL(func) | |
+ EVT_MOUSEWHEEL(func) \ | |
+ EVT_MAGNIFY(func) | |
// Scrolling from wxWindow (sent to wxScrolledWindow) | |
#define EVT_SCROLLWIN_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(func)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage is here.
http://wiki.kicad.jp/%E3%83%93%E3%83%AB%E3%83%89%E6%96%B9%E6%B3%95#Mac_OSX