-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 26ac7ef
Showing
17 changed files
with
1,134 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Xcode (from gitignore.io) | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
|
||
# CocoaPod | ||
Pods/* | ||
Podfile.lock | ||
|
||
# others | ||
*.swp | ||
!.gitkeep | ||
.DS_Store |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
SyakaiseiFilterButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// AppDelegate.swift | ||
// SyakaiseiFilterButton | ||
// | ||
|
||
import Cocoa | ||
|
||
@NSApplicationMain | ||
class AppDelegate: NSObject, NSApplicationDelegate { | ||
|
||
|
||
|
||
func applicationDidFinishLaunching(_ aNotification: Notification) { | ||
// Insert code here to initialize your application | ||
} | ||
|
||
func applicationWillTerminate(_ aNotification: Notification) { | ||
// Insert code here to tear down your application | ||
} | ||
|
||
|
||
} | ||
|
58 changes: 58 additions & 0 deletions
58
SyakaiseiFilterButton/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16D30" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="jGA-0Y-lOj"> | ||
<dependencies> | ||
<deployment identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaDFRPlugin" version="12062"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
<capability name="the Touch Bar" message="Use a version of macOS with Touch Bar support." minToolsVersion="8.1" minSystemVersion="10.12.1" requiredIntegratedClassName="NSTouchBar"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Application--> | ||
<scene sceneID="JPo-4y-FX3"> | ||
<objects> | ||
<application id="hnw-xV-0zn" sceneMemberID="viewController"> | ||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> | ||
<items> | ||
<menuItem title="SyakaiseiFilterButton" id="1Xt-HY-uBw"> | ||
<modifierMask key="keyEquivalentModifierMask"/> | ||
<menu key="submenu" title="SyakaiseiFilterButton" systemMenu="apple" id="uQy-DD-JDr"> | ||
<items> | ||
<menuItem title="About SyakaiseiFilterButton" id="5kV-Vb-QxS"> | ||
<modifierMask key="keyEquivalentModifierMask"/> | ||
<connections> | ||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/> | ||
</connections> | ||
</menuItem> | ||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/> | ||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/> | ||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> | ||
<menuItem title="Services" id="NMo-om-nkz"> | ||
<modifierMask key="keyEquivalentModifierMask"/> | ||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> | ||
</menuItem> | ||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> | ||
<menuItem title="Hide SyakaiseiFilterButton" keyEquivalent="h" id="Olw-nP-bQN"> | ||
<connections> | ||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/> | ||
</connections> | ||
</menuItem> | ||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO"> | ||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
<connections> | ||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/> | ||
</connections> | ||
</menuItem> | ||
<menuItem title="Show All" id="Kd2-mp-pUS"> | ||
<modifierMask key="keyEquivalentModifierMask"/> | ||
<connections> | ||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/> | ||
</connections> | ||
</menuItem> | ||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> | ||
<menuItem title="Quit SyakaiseiFilterButton" keyEquivalent="q" id="4sb-4s-VLi"> | ||
<connections> | ||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/> | ||
</connections> | ||
</menuItem> | ||
</items> | ||
</menu> | ||
</menuItem> | ||
</items> | ||
</menu> | ||
<connections> | ||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/> | ||
</connections> | ||
</application> | ||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="SyakaiseiFilterButton" customModuleProvider="target"/> | ||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="75" y="0.0"/> | ||
</scene> | ||
<!--Window Controller--> | ||
<scene sceneID="R2V-B0-nI4"> | ||
<objects> | ||
<windowController id="jGA-0Y-lOj" customClass="WindowController" customModule="SyakaiseiFilterButton" customModuleProvider="target" sceneMemberID="viewController"> | ||
<window key="window" title="社会性フィルタボタン" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="Ckk-yw-fiv"> | ||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> | ||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> | ||
<rect key="contentRect" x="196" y="240" width="480" height="270"/> | ||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/> | ||
</window> | ||
<touchBar key="touchBar" id="elq-lF-87b"> | ||
<touchBarItems> | ||
<touchBarItem id="cVS-sE-eP8" userLabel="へぇボタン"> | ||
<viewController key="viewController" id="nWI-jq-qfU"> | ||
<button key="view" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Jh-7u-O9L"> | ||
<rect key="frame" x="0.0" y="0.0" width="72" height="30"/> | ||
<buttonCell key="cell" type="push" title="へぇ" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="7GC-iM-dql"> | ||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> | ||
<font key="font" size="13" name=".HiraKakuInterface-W3"/> | ||
</buttonCell> | ||
<connections> | ||
<action selector="touchHeButton:" target="jGA-0Y-lOj" id="Tb5-84-Y6q"/> | ||
</connections> | ||
</button> | ||
</viewController> | ||
</touchBarItem> | ||
</touchBarItems> | ||
</touchBar> | ||
<connections> | ||
<segue destination="5gI-5U-AMq" kind="relationship" relationship="window.shadowedContentViewController" id="nsd-lR-9xd"/> | ||
</connections> | ||
</windowController> | ||
<customObject id="6f7-a7-6o1" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="75" y="250"/> | ||
</scene> | ||
<!--View Controller--> | ||
<scene sceneID="hIz-AP-VOD"> | ||
<objects> | ||
<viewController id="5gI-5U-AMq" customClass="ViewController" customModule="SyakaiseiFilterButton" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" wantsLayer="YES" id="ERx-hH-rdd"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P5S-gE-JaI"> | ||
<rect key="frame" x="18" y="177" width="444" height="73"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="MacBookのタッチバーにある「へぇ」を押すとへぇってなるよ" id="YRC-Ht-bsM"> | ||
<font key="font" metaFont="system"/> | ||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> | ||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> | ||
</textFieldCell> | ||
</textField> | ||
</subviews> | ||
</view> | ||
</viewController> | ||
<customObject id="2Tp-Fl-jBw" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="75" y="655"/> | ||
</scene> | ||
</scenes> | ||
</document> |
16 changes: 16 additions & 0 deletions
16
SyakaiseiFilterButton/Class/Controller/ViewController.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// ViewController.swift | ||
// SyakaiseiFilterTouchBar | ||
// | ||
// ウィンドウの画面上の処理を扱う | ||
// | ||
|
||
import Cocoa | ||
|
||
class ViewController: NSViewController { | ||
// MARK:- Life Cicle Method | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
} | ||
} | ||
|
38 changes: 38 additions & 0 deletions
38
SyakaiseiFilterButton/Class/Controller/WindowController.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// WindowController.swift | ||
// SyakaiseiFilterTouchBar | ||
// | ||
// ウィンドウが開いている時の処理を扱う | ||
// | ||
|
||
import Cocoa | ||
import AVFoundation | ||
|
||
class WindowController: NSWindowController, AVAudioPlayerDelegate { | ||
|
||
// MARK:- Var on fields | ||
/// AudioPlayer | ||
var AudioPlayer = AVAudioPlayer () | ||
|
||
// MARK:- Life Cicle Method | ||
override func windowDidLoad() { | ||
super.windowDidLoad() | ||
// 再生する音声ファイル指定 | ||
let soundFilePath = NSURL(fileURLWithPath:Bundle.main.path(forResource: "line-girl1-hee1", ofType: "mp3")!) | ||
|
||
AudioPlayer = try! AVAudioPlayer(contentsOf: soundFilePath as URL) | ||
AudioPlayer.prepareToPlay() | ||
AudioPlayer.delegate = self | ||
} | ||
|
||
// MARK:- TouchBarButtonイベント | ||
/// へぇボタン押下時の処理 | ||
/// | ||
/// - Parameter sender: <#sender description#> | ||
@IBAction func touchHeButton(_ sender: Any) { | ||
AudioPlayer.currentTime = 0 | ||
// 音の再生 | ||
AudioPlayer.play() | ||
} | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Document.swift | ||
// SyakaiseiFilterButton | ||
// | ||
|
||
import Cocoa | ||
|
||
class Document: NSPersistentDocument { | ||
|
||
override init() { | ||
super.init() | ||
// Add your subclass-specific initialization here. | ||
} | ||
|
||
override class func autosavesInPlace() -> Bool { | ||
return true | ||
} | ||
|
||
override func makeWindowControllers() { | ||
// Returns the Storyboard that contains your Document window. | ||
let storyboard = NSStoryboard(name: "Main", bundle: nil) | ||
let windowController = storyboard.instantiateController(withIdentifier: "Document Window Controller") as! NSWindowController | ||
self.addWindowController(windowController) | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
SyakaiseiFilterButton/Document.xcdatamodeld/.xccurrentversion
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>_XCCurrentVersionName</key> | ||
<string>Document.xcdatamodel</string> | ||
</dict> | ||
</plist> |
4 changes: 4 additions & 0 deletions
4
SyakaiseiFilterButton/Document.xcdatamodeld/Document.xcdatamodel/contents
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> | ||
<elements/> | ||
</model> |
Oops, something went wrong.