Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yuichi1004 committed Feb 9, 2019
0 parents commit 679d1d8
Show file tree
Hide file tree
Showing 24 changed files with 674 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DS_Store

build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
337 changes: 337 additions & 0 deletions Cam.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
585E311D220F1FD400419AB0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585E311C220F1FD400419AB0 /* AppDelegate.swift */; };
585E311F220F1FD400419AB0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585E311E220F1FD400419AB0 /* ViewController.swift */; };
585E3121220F1FD500419AB0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 585E3120220F1FD500419AB0 /* Assets.xcassets */; };
585E3124220F1FD500419AB0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 585E3122220F1FD500419AB0 /* Main.storyboard */; };
585E312D220F231600419AB0 /* MovablePanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585E312C220F231600419AB0 /* MovablePanel.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
585E3119220F1FD400419AB0 /* Cam.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cam.app; sourceTree = BUILT_PRODUCTS_DIR; };
585E311C220F1FD400419AB0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
585E311E220F1FD400419AB0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
585E3120220F1FD500419AB0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
585E3123220F1FD500419AB0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
585E3125220F1FD500419AB0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
585E3126220F1FD500419AB0 /* Cam.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Cam.entitlements; sourceTree = "<group>"; };
585E312C220F231600419AB0 /* MovablePanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovablePanel.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
585E3116220F1FD400419AB0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
585E3110220F1FD400419AB0 = {
isa = PBXGroup;
children = (
585E311B220F1FD400419AB0 /* Cam */,
585E311A220F1FD400419AB0 /* Products */,
);
sourceTree = "<group>";
};
585E311A220F1FD400419AB0 /* Products */ = {
isa = PBXGroup;
children = (
585E3119220F1FD400419AB0 /* Cam.app */,
);
name = Products;
sourceTree = "<group>";
};
585E311B220F1FD400419AB0 /* Cam */ = {
isa = PBXGroup;
children = (
585E311C220F1FD400419AB0 /* AppDelegate.swift */,
585E311E220F1FD400419AB0 /* ViewController.swift */,
585E312C220F231600419AB0 /* MovablePanel.swift */,
585E3120220F1FD500419AB0 /* Assets.xcassets */,
585E3122220F1FD500419AB0 /* Main.storyboard */,
585E3125220F1FD500419AB0 /* Info.plist */,
585E3126220F1FD500419AB0 /* Cam.entitlements */,
);
path = Cam;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
585E3118220F1FD400419AB0 /* Cam */ = {
isa = PBXNativeTarget;
buildConfigurationList = 585E3129220F1FD500419AB0 /* Build configuration list for PBXNativeTarget "Cam" */;
buildPhases = (
585E3115220F1FD400419AB0 /* Sources */,
585E3116220F1FD400419AB0 /* Frameworks */,
585E3117220F1FD400419AB0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Cam;
productName = Cam;
productReference = 585E3119220F1FD400419AB0 /* Cam.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
585E3111220F1FD400419AB0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Yuichi Murata";
TargetAttributes = {
585E3118220F1FD400419AB0 = {
CreatedOnToolsVersion = 10.1;
SystemCapabilities = {
com.apple.Sandbox = {
enabled = 0;
};
};
};
};
};
buildConfigurationList = 585E3114220F1FD400419AB0 /* Build configuration list for PBXProject "Cam" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 585E3110220F1FD400419AB0;
productRefGroup = 585E311A220F1FD400419AB0 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
585E3118220F1FD400419AB0 /* Cam */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
585E3117220F1FD400419AB0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
585E3121220F1FD500419AB0 /* Assets.xcassets in Resources */,
585E3124220F1FD500419AB0 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
585E3115220F1FD400419AB0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
585E311F220F1FD400419AB0 /* ViewController.swift in Sources */,
585E312D220F231600419AB0 /* MovablePanel.swift in Sources */,
585E311D220F1FD400419AB0 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
585E3122220F1FD500419AB0 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
585E3123220F1FD500419AB0 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
585E3127220F1FD500419AB0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
585E3128220F1FD500419AB0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
585E312A220F1FD500419AB0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Cam/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = yuichi1004.Cam;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
585E312B220F1FD500419AB0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Cam/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = yuichi1004.Cam;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
585E3114220F1FD400419AB0 /* Build configuration list for PBXProject "Cam" */ = {
isa = XCConfigurationList;
buildConfigurations = (
585E3127220F1FD500419AB0 /* Debug */,
585E3128220F1FD500419AB0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
585E3129220F1FD500419AB0 /* Build configuration list for PBXNativeTarget "Cam" */ = {
isa = XCConfigurationList;
buildConfigurations = (
585E312A220F1FD500419AB0 /* Debug */,
585E312B220F1FD500419AB0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 585E3111220F1FD400419AB0 /* Project object */;
}
30 changes: 30 additions & 0 deletions Cam/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// AppDelegate.swift
// Cam
//
// Created by Yuichi Murata on 2019/02/09.
// Copyright © 2019 Yuichi Murata. All rights reserved.
//

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
let statusItem = NSStatusBar.system.statusItem(withLength:NSStatusItem.squareLength)

func applicationDidFinishLaunching(_ aNotification: Notification) {
if let button = statusItem.button {
button.image = NSImage(named: NSImage.Name("StatusBarButtonImage"))
}
let menu = NSMenu()
menu.addItem(NSMenuItem(title: "Quit Cam", action: #selector(NSApplication.terminate(_:)), keyEquivalent:"Q"))
statusItem.menu = menu
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}


}

Loading

0 comments on commit 679d1d8

Please sign in to comment.