├── .gitignore ├── .gitmodules ├── README.md ├── RecordMyScreen.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── RecordMyScreen ├── CSAppDelegate.h ├── CSAppDelegate.m ├── CSCreditsViewController.h ├── CSCreditsViewController.m ├── CSRecordViewController.h ├── CSRecordViewController.m ├── CSRecordViewController.xib ├── CSRecordViewController_iPad.xib ├── CSRecordingListViewController.h ├── CSRecordingListViewController.m ├── CSScreenRecorder.h ├── CSScreenRecorder.m ├── Credits.plist ├── Default-568h@2x.png ├── InAppSettingsKit │ ├── Controllers │ │ ├── IASKAppSettingsViewController.h │ │ ├── IASKAppSettingsViewController.m │ │ ├── IASKAppSettingsWebViewController.h │ │ ├── IASKAppSettingsWebViewController.m │ │ ├── IASKSpecifierValuesViewController.h │ │ ├── IASKSpecifierValuesViewController.m │ │ └── IASKViewController.h │ ├── IOSurface │ │ ├── IOSurface.h │ │ ├── IOSurfaceAccelerator.h │ │ ├── IOSurfaceBase.h │ │ └── IOSurfaceClient.h │ ├── Models │ │ ├── IASKSettingsReader.h │ │ ├── IASKSettingsReader.m │ │ ├── IASKSettingsStore.h │ │ ├── IASKSettingsStore.m │ │ ├── IASKSettingsStoreFile.h │ │ ├── IASKSettingsStoreFile.m │ │ ├── IASKSettingsStoreUserDefaults.h │ │ ├── IASKSettingsStoreUserDefaults.m │ │ ├── IASKSpecifier.h │ │ └── IASKSpecifier.m │ └── Views │ │ ├── IASKPSSliderSpecifierViewCell.h │ │ ├── IASKPSSliderSpecifierViewCell.m │ │ ├── IASKPSTextFieldSpecifierViewCell.h │ │ ├── IASKPSTextFieldSpecifierViewCell.m │ │ ├── IASKPSTitleValueSpecifierViewCell.h │ │ ├── IASKPSTitleValueSpecifierViewCell.m │ │ ├── IASKSlider.h │ │ ├── IASKSlider.m │ │ ├── IASKSwitch.h │ │ ├── IASKSwitch.m │ │ ├── IASKTextField.h │ │ └── IASKTextField.m ├── RecordMyScreen-Info.plist ├── RecordMyScreen-Prefix.pch ├── en.lproj │ └── InfoPlist.strings ├── headers │ ├── CoreSurface │ │ └── CoreSurface.h │ ├── Headers │ │ ├── IOSurface.h │ │ ├── IOSurfaceAPI.h │ │ └── IOSurfaceBase.h │ ├── IOKit │ │ ├── IOBSD.h │ │ ├── IOCFBundle.h │ │ ├── IOCFPlugIn.h │ │ ├── IOCFSerialize.h │ │ ├── IOCFURLAccess.h │ │ ├── IOCFUnserialize.h │ │ ├── IODataQueueClient.h │ │ ├── IODataQueueShared.h │ │ ├── IOKitKeys.h │ │ ├── IOKitLib.h │ │ ├── IOKitServer.h │ │ ├── IOMessage.h │ │ ├── IOReturn.h │ │ ├── IOSharedLock.h │ │ ├── IOTypes.h │ │ ├── OSMessageNotification.h │ │ └── iokitmig.h │ └── IOMobileFrameBuffer.h ├── lens.png ├── lens@2x.png ├── list.png ├── list@2x.png ├── main.m ├── settings.png ├── settings@2x.png ├── side_top.png ├── side_top@2x.png ├── team.png ├── team@2x.png ├── video.png └── video@2x.png ├── SAVideoRangeSlider ├── SAResizibleBubble.h ├── SAResizibleBubble.m ├── SASliderLeft.h ├── SASliderLeft.m ├── SASliderRight.h ├── SASliderRight.m ├── SAVideoRangeSlider.h └── SAVideoRangeSlider.m ├── Settings.bundle ├── Root.plist └── en.lproj │ └── Root.strings ├── icon.png ├── icon@2x.png ├── icon~ipad.png ├── icon~ipad@2x.png └── recordmyscreentweak ├── ActivatorListener.mm ├── CSRecordCompletionAlert.h ├── CSRecordCompletionAlert.m ├── CSRecordQueryWindow.h ├── CSRecordQueryWindow.m ├── CSWindow.h ├── CSWindow.m ├── Makefile ├── RecordMyScreenTweak.plist ├── control ├── layout ├── DEBIAN │ └── control └── Library │ ├── Application Support │ └── RecordMyScreen │ │ ├── lens.png │ │ └── lens@2x.png │ └── MobileSubstrate │ └── DynamicLibraries │ └── RecordMyScreenTweak.plist └── theos /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata/ 3 | build/ 4 | DerivedData/ 5 | *.xcuserstate 6 | 7 | RecordMyScreen.xcodeproj/project.xcworkspace/xcuserdata/truehybridx.xcuserdatad/UserInterfaceState.xcuserstate 8 | 9 | RecordMyScreen.xcodeproj/project.xcworkspace/xcuserdata/truehybridx.xcuserdatad/UserInterfaceState.xcuserstate 10 | 11 | RecordMyScreen.xcodeproj/project.xcworkspace/xcuserdata/truehybridx.xcuserdatad/UserInterfaceState.xcuserstate 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "InAppSettingsKit"] 2 | path = InAppSettingsKit 3 | url = https://github.com/futuretap/InAppSettingsKit.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## RecordMyScreen 2 | 3 | Record the display even on non-jailbroken iPhones. 4 | 5 | Licenced with the MIT Licence with the following 2 clauses added onto it: 6 | You may not use the source code for any commercial product. 7 | You may use the videos created from RecordMyScreen for commercial use. 8 | 9 | ## Credits 10 | 11 | * CoolStar (@coolstarorg) - Started the project, and created the initial code. 12 | * ProtoSphere (@protosphere7) - Helped transition to encoding the video on-the-fly 13 | * John Coates (@punksomething) - Improved the framerate of the video captured, fixed the screen tearing, and made RecordMyScreen usable on <= A4 14 | * Brandon Etheredge (@brandonEtheredg) - Added support for the iPad on the UI 15 | * Nicholas Gomolion - Prevented other apps from stopping our recording (unfortunately using an iOS 6 only API) 16 | * Aditya KD (@caughtinflux) - Moved the recording stuff to a separate class. Makes it a lot easier for us to start on the tweak version :) 17 | * David Gölzhäuser (@idoodler) - Added iPad Mini support 18 | 19 | ## Technical Specs 20 | 21 | 1. ARMv7 device (A5 recommended) 22 | 2. iOS 5 or higher (iOS 6 recommended, may work on iOS 4) 23 | 3. Developer Account or Jailbreak to install 24 | 4. XCode 4.4.1 or higher 25 | 26 | ## Device Compatibility 27 | 28 | iPhones 29 | 30 | 1. iPhone 3GS 31 | 2. iPhone 4 32 | 3. iPhone 4S 33 | 4. iPhone 5 34 | 35 | Notes: 36 | 37 | * iPhone 2G - Not supported: iOS 3 is too ancient, armv6, way too slow, no h.264 encoding support 38 | * iPhone 3G - Not supported: armv6, too slow, does this even support h.264 encoding? 39 | 40 | iPod touch 41 | 42 | 1. iPod touch 3G 43 | 2. iPod touch 4 44 | 3. iPod touch 5 45 | 46 | Notes: 47 | 48 | * iPod touch 1G - Not Supported: No microphone, iOS 3 is too ancient, armv6, way too slow, no h.264 encoding support 49 | * iPod touch 2G - Not Supported: armv6, probably doesn't support h.264 encoding 50 | * iPod touch 2G and 3G will need a headset with mic plugged into the headphone jack for backgrounding to work 51 | 52 | iPad's 53 | 54 | 1. iPad 1 (maybe, test please?) 55 | 2. iPad 2 56 | 3. iPad 3 (requires additional setup) 57 | 4. iPad 4 (should work with same settings as iPad 3, but needs testing) 58 | 59 | Note: iPads with Retina Display have Issue [#8](https://github.com/coolstar/RecordMyScreen/issues/8) 60 | Note for Retina iPads: 61 | 1. You MUST set Video size to 50% scale, as the video encoder doesn't work with the 2048x1536 screen res. 62 | 2. There is a little tearing in the video on retina iPads. We will fix it once we can take a look at it. 63 | 64 | ## Jailbroken users without access to a Mac+XCode 65 | 66 | You may download the latest build of the last stable release (1.0) here: http://d.pr/f/Hnsw 67 | -------------------------------------------------------------------------------- /RecordMyScreen.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RecordMyScreen/CSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CSAppDelegate.h 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/29/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | // 9 | 10 | #import 11 | 12 | @interface CSAppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @property (strong, nonatomic) UITabBarController *tabBarController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /RecordMyScreen/CSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // CSAppDelegate.m 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/29/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import "CSAppDelegate.h" 10 | #import "CSRecordViewController.h" 11 | #import "CSRecordingListViewController.h" 12 | #import "CSCreditsViewController.h" 13 | #import "IASKAppSettingsViewController.h" 14 | 15 | @implementation CSAppDelegate 16 | 17 | - (void)dealloc 18 | { 19 | [_window release]; 20 | [_tabBarController release]; 21 | [super dealloc]; 22 | } 23 | 24 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 25 | { 26 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 27 | // Override point for customization after application launch. 28 | UINavigationController *savedNavVC,*settingsNavVC,*creditsNavVC; 29 | UIViewController *recordVC,*savedVC; 30 | UITableViewController *creditsVC; 31 | IASKAppSettingsViewController *settingsVC; 32 | 33 | // Check for iPad 34 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 35 | recordVC = [[[CSRecordViewController alloc] initWithNibName:@"CSRecordViewController" bundle:nil] autorelease]; 36 | } else { 37 | recordVC = [[[CSRecordViewController alloc] initWithNibName:@"CSRecordViewController_iPad" bundle:nil] autorelease]; 38 | } 39 | 40 | savedVC = [[[CSRecordingListViewController alloc] init] autorelease]; 41 | savedNavVC = [[[UINavigationController alloc] initWithRootViewController:savedVC] autorelease]; 42 | savedNavVC.navigationBar.barStyle = UIBarStyleBlack; 43 | 44 | settingsVC = [[[IASKAppSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped] autorelease]; 45 | settingsVC.title = NSLocalizedString(@"Settings", @""); 46 | settingsVC.tabBarItem = [[[UITabBarItem alloc] initWithTitle:settingsVC.title image:[UIImage imageNamed:@"settings"] tag:0] autorelease]; 47 | settingsVC.showDoneButton = NO; 48 | settingsNavVC = [[[UINavigationController alloc] initWithRootViewController:settingsVC] autorelease]; 49 | settingsNavVC.navigationBar.barStyle = UIBarStyleBlack; 50 | 51 | creditsVC = [[[CSCreditsViewController alloc] initWithStyle:UITableViewStyleGrouped] autorelease]; 52 | creditsNavVC = [[[UINavigationController alloc] initWithRootViewController:creditsVC] autorelease]; 53 | creditsNavVC.navigationBar.barStyle = UIBarStyleBlack; 54 | 55 | self.tabBarController = [[[UITabBarController alloc] init] autorelease]; 56 | self.tabBarController.viewControllers = @[recordVC,savedNavVC,settingsNavVC,creditsNavVC]; 57 | self.window.rootViewController = self.tabBarController; 58 | [self.window makeKeyAndVisible]; 59 | return YES; 60 | } 61 | 62 | - (void)applicationWillResignActive:(UIApplication *)application 63 | { 64 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 65 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 66 | } 67 | 68 | - (void)applicationDidEnterBackground:(UIApplication *)application 69 | { 70 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 71 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 72 | } 73 | 74 | - (void)applicationWillEnterForeground:(UIApplication *)application 75 | { 76 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 77 | } 78 | 79 | - (void)applicationDidBecomeActive:(UIApplication *)application 80 | { 81 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 82 | } 83 | 84 | - (void)applicationWillTerminate:(UIApplication *)application 85 | { 86 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 87 | } 88 | 89 | /* 90 | // Optional UITabBarControllerDelegate method. 91 | - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController 92 | { 93 | } 94 | */ 95 | 96 | /* 97 | // Optional UITabBarControllerDelegate method. 98 | - (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed 99 | { 100 | } 101 | */ 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /RecordMyScreen/CSCreditsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CSCreditsViewController.h 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 2/17/13. 6 | // Copyright (c) 2013 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CSCreditsViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RecordMyScreen/CSCreditsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CSCreditsViewController.m 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 2/17/13. 6 | // Copyright (c) 2013 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import "CSCreditsViewController.h" 10 | 11 | @interface CSTableViewCell : UITableViewCell { 12 | UITextView *_descriptionTextLabel; 13 | } 14 | @property (nonatomic, retain) UITextView *descriptionTextLabel; 15 | @end 16 | 17 | @implementation CSTableViewCell 18 | @synthesize descriptionTextLabel; 19 | 20 | - (void)layoutSubviews { 21 | [super layoutSubviews]; 22 | CGRect frame = [self.textLabel frame]; 23 | frame.origin.y = 5; 24 | [self.textLabel setFrame:frame]; 25 | 26 | frame = [self.detailTextLabel frame]; 27 | frame.origin.y = 5; 28 | [self.detailTextLabel setFrame:frame]; 29 | } 30 | 31 | @end 32 | 33 | @interface CSCreditsViewController () { 34 | NSArray *_credits; 35 | } 36 | 37 | @end 38 | 39 | @implementation CSCreditsViewController 40 | 41 | - (id)initWithStyle:(UITableViewStyle)style 42 | { 43 | self = [super initWithStyle:style]; 44 | if (self) { 45 | self.title = NSLocalizedString(@"Credits", @""); 46 | self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:self.title image:[UIImage imageNamed:@"team"] tag:0] autorelease]; 47 | _credits = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"plist"]]; 48 | // Custom initialization 49 | } 50 | return self; 51 | } 52 | 53 | - (void)viewDidLoad 54 | { 55 | [super viewDidLoad]; 56 | 57 | // Uncomment the following line to preserve selection between presentations. 58 | // self.clearsSelectionOnViewWillAppear = NO; 59 | 60 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 61 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 62 | } 63 | 64 | - (void)didReceiveMemoryWarning 65 | { 66 | [super didReceiveMemoryWarning]; 67 | // Dispose of any resources that can be recreated. 68 | } 69 | 70 | #pragma mark - Table view data source 71 | 72 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 73 | { 74 | // Return the number of sections. 75 | return 1; 76 | } 77 | 78 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 79 | { 80 | // Return the number of rows in the section. 81 | return [_credits count]; 82 | } 83 | 84 | - (CSTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 85 | { 86 | static NSString *CreditsIdentifier = @"CreditsIdentifier"; 87 | CSTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CreditsIdentifier]; 88 | if (!cell){ 89 | cell = [[[CSTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CreditsIdentifier] autorelease]; 90 | } 91 | NSDictionary *person = [_credits objectAtIndex:indexPath.row]; 92 | [cell.textLabel setText:[person objectForKey:@"name"]]; 93 | 94 | NSString *description = [person objectForKey:@"description"]; 95 | CGSize stringSize = [description sizeWithFont:[UIFont boldSystemFontOfSize:15] constrainedToSize:CGSizeMake(self.view.bounds.size.width, 9999) lineBreakMode:UILineBreakModeWordWrap]; 96 | 97 | if (cell.descriptionTextLabel == nil){ 98 | UITextView *descriptionTextView = [[UITextView alloc] initWithFrame:CGRectMake(5, 25, 290, stringSize.height+10)]; 99 | [descriptionTextView setFont:[UIFont systemFontOfSize:15.0]]; 100 | [descriptionTextView setText:description]; 101 | [descriptionTextView setTextColor:[UIColor blackColor]]; 102 | [descriptionTextView setBackgroundColor:[UIColor clearColor]]; 103 | [descriptionTextView setEditable:NO]; 104 | [descriptionTextView setScrollEnabled:NO]; 105 | [descriptionTextView setUserInteractionEnabled:NO]; 106 | [cell.contentView addSubview:[descriptionTextView autorelease]]; 107 | [cell setDescriptionTextLabel:descriptionTextView]; 108 | } 109 | 110 | if ([person objectForKey:@"twitter"] != nil) { 111 | [cell.detailTextLabel setText:[@"@" stringByAppendingString:[person objectForKey:@"twitter"]]]; 112 | [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; 113 | } 114 | 115 | return cell; 116 | } 117 | 118 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 119 | NSDictionary *person = [_credits objectAtIndex:indexPath.row]; 120 | NSString *description = [person objectForKey:@"description"]; 121 | CGSize stringSize = [description sizeWithFont:[UIFont boldSystemFontOfSize:15] 122 | constrainedToSize:CGSizeMake(self.view.bounds.size.width, 9999) 123 | lineBreakMode:UILineBreakModeWordWrap]; 124 | 125 | return stringSize.height+40; 126 | } 127 | 128 | #pragma mark - Table view delegate 129 | 130 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 131 | { 132 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 133 | NSDictionary *person = [_credits objectAtIndex:indexPath.row]; 134 | if ([person objectForKey:@"twitter"] != nil) { 135 | NSString *twitterLink = [@"https://www.twitter.com/" stringByAppendingString:[person objectForKey:@"twitter"]]; 136 | NSURL *twitterUrl = [NSURL URLWithString:twitterLink]; 137 | [[UIApplication sharedApplication] openURL:twitterUrl]; 138 | } 139 | } 140 | 141 | - (void)dealloc { 142 | [_credits release]; 143 | [super dealloc]; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /RecordMyScreen/CSRecordViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CSRecordViewController.h 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/29/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import "CSScreenRecorder.h" 13 | 14 | 15 | @interface CSRecordViewController : UIViewController 16 | { 17 | UISegmentedControl *_record, *_stop; 18 | IBOutlet UIImageView *_recordbar; 19 | IBOutlet UILabel *_statusLabel; 20 | IBOutlet UIProgressView *_progressView; 21 | 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /RecordMyScreen/CSRecordViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CSRecordViewController.m 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/29/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import "CSRecordViewController.h" 10 | #import 11 | #include 12 | #import 13 | 14 | 15 | @interface CSRecordViewController () 16 | { 17 | CSScreenRecorder *_screenRecorder; 18 | } 19 | @end 20 | 21 | @implementation CSRecordViewController 22 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 23 | { 24 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 25 | if (self) { 26 | _screenRecorder = [[CSScreenRecorder alloc] init]; 27 | _screenRecorder.delegate = self; 28 | self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Record", @"") image:[UIImage imageNamed:@"video"] tag:0] autorelease]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)dealloc 34 | { 35 | [_screenRecorder release]; 36 | _screenRecorder = nil; 37 | 38 | [super dealloc]; 39 | } 40 | 41 | #pragma mark - UI 42 | - (void)viewDidLoad 43 | { 44 | [super viewDidLoad]; 45 | 46 | _record = [[[UISegmentedControl alloc] initWithItems:@[@"Record"]] autorelease]; 47 | _record.momentary = YES; 48 | _record.segmentedControlStyle = UISegmentedControlStyleBar; 49 | _record.tintColor = [UIColor greenColor]; 50 | [_record setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin]; 51 | [_record addTarget:self action:@selector(record:) forControlEvents:UIControlEventValueChanged]; 52 | 53 | _stop = [[[UISegmentedControl alloc] initWithItems:@[@"Stop"]] autorelease]; 54 | _stop.momentary = YES; 55 | _stop.segmentedControlStyle = UISegmentedControlStyleBar; 56 | _stop.tintColor = [UIColor redColor]; 57 | _stop.enabled = NO; 58 | [_stop setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin]; 59 | [_stop addTarget:self action:@selector(stop:) forControlEvents:UIControlEventValueChanged]; 60 | 61 | _progressView.hidden = YES; 62 | 63 | 64 | // Check for iPad for layout 65 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 66 | _record.frame = CGRectMake(20, 103, 135, 33); 67 | _stop.frame = CGRectMake(170, 103, 135, 33); 68 | } else { 69 | 70 | _record.frame = CGRectMake(230, 150, 135, 33); 71 | _stop.frame = CGRectMake(400, 150, 135, 33); 72 | } 73 | 74 | [self.view addSubview:_record]; 75 | [self.view addSubview:_stop]; 76 | 77 | 78 | // Do any additional setup after loading the view from its nib. 79 | } 80 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 81 | { 82 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 83 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 84 | } else { 85 | return YES; 86 | } 87 | } 88 | 89 | #pragma mark - Starting / Stopping 90 | 91 | - (void)record:(id)sender 92 | { 93 | // Update the UI 94 | _statusLabel.text = @"00:00:00"; 95 | _stop.enabled = YES; 96 | _record.enabled = NO; 97 | 98 | // Remove the old video 99 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/video.mp4"] error:nil]; 100 | 101 | NSString *videoPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/video.mp4"]; 102 | if (![[[NSUserDefaults standardUserDefaults] objectForKey:@"record"] boolValue]) { 103 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 104 | [dateFormatter setDateFormat:@"MM:dd:yyyy h:mm:ss a"]; 105 | NSString *date = [dateFormatter stringFromDate:[NSDate date]]; 106 | NSString *outName = [NSString stringWithFormat:@"Documents/%@.mp4",date]; 107 | videoPath = [NSHomeDirectory() stringByAppendingPathComponent:outName]; 108 | [dateFormatter release]; 109 | } 110 | 111 | // Set the number of audio channels 112 | NSNumber *audioChannels = [[NSUserDefaults standardUserDefaults] objectForKey:@"channels"]; 113 | NSNumber *sampleRate = [[NSUserDefaults standardUserDefaults] objectForKey:@"samplerate"]; 114 | NSString *audioPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/audio.caf"]; 115 | 116 | _screenRecorder.videoOutPath = videoPath; 117 | _screenRecorder.audioOutPath = audioPath; 118 | _screenRecorder.numberOfAudioChannels = audioChannels; 119 | _screenRecorder.audioSampleRate = sampleRate; 120 | 121 | [_screenRecorder startRecordingScreen]; 122 | } 123 | 124 | - (void)stop:(id)sender 125 | { 126 | [_screenRecorder stopRecordingScreen]; 127 | } 128 | 129 | - (void)screenRecorderDidStopRecording:(CSScreenRecorder *)recorder 130 | { 131 | // Disable the stop button 132 | _stop.enabled = NO; 133 | 134 | // Announce Encoding will begin 135 | _statusLabel.text = @"Encoding Movie..."; 136 | 137 | // Show progress view 138 | _progressView.hidden = NO; 139 | 140 | // Update the UI for another round 141 | dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul); 142 | dispatch_async(queue, ^{ 143 | dispatch_async(dispatch_get_main_queue(), ^{ 144 | _statusLabel.text = @"Ready"; 145 | _progressView.hidden = YES; 146 | _record.enabled = YES; 147 | }); 148 | }); 149 | } 150 | 151 | - (void)screenRecorder:(CSScreenRecorder *)recorder recordingTimeChanged:(NSTimeInterval)recordingInterval 152 | { 153 | // get an NSDate object from NSTimeInterval 154 | NSDate *timerDate = [NSDate dateWithTimeIntervalSince1970:recordingInterval]; 155 | 156 | // Make a date formatter (Possibly reuse instead of creating each time) 157 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 158 | [dateFormatter setDateFormat:@"HH:mm:ss"]; 159 | [dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0.0]]; 160 | 161 | // Set the current time since recording began 162 | NSString *timeString = [dateFormatter stringFromDate:timerDate]; 163 | _statusLabel.text = timeString; 164 | [dateFormatter release]; 165 | } 166 | 167 | // Stubs. Do Error handling shit here. 168 | - (void)screenRecorder:(CSScreenRecorder *)recorder videoContextSetupFailedWithError:(NSError *)error 169 | { 170 | 171 | } 172 | 173 | - (void)screenRecorder:(CSScreenRecorder *)recorder audioRecorderSetupFailedWithError:(NSError *)error 174 | { 175 | 176 | } 177 | 178 | - (void)screenRecorder:(CSScreenRecorder *)recorder audioSessionSetupFailedWithError:(NSError *)error 179 | { 180 | 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /RecordMyScreen/CSRecordingListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CSRecordingListViewController.h 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/30/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "SAVideoRangeSlider.h" 12 | 13 | 14 | @interface CSRecordingListViewController : UITableViewController { 15 | NSMutableArray *_folderItems; 16 | CGFloat startTime; 17 | CGFloat stopTime; 18 | BOOL isEditing; 19 | int row; 20 | SAVideoRangeSlider *mySAVideoRangeSlider; 21 | UIButton *ok; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /RecordMyScreen/CSScreenRecorder.h: -------------------------------------------------------------------------------- 1 | // 2 | // CSScreenRecorder.h 3 | // RecordMyScreen 4 | // 5 | // Created by Aditya KD on 02/04/13. 6 | // Copyright (c) 2013 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol CSScreenRecorderDelegate; 13 | 14 | 15 | @interface CSScreenRecorder : NSObject 16 | 17 | // All these properties must be set before -startRecordingScreen is called, or defaults will be used. 18 | 19 | // the path where the video/audio is saved whilst being recorded. 20 | @property(nonatomic, copy) NSString *videoOutPath; 21 | @property(nonatomic, copy) NSString *audioOutPath; 22 | 23 | @property(nonatomic, copy) NSNumber *audioSampleRate; 24 | @property(nonatomic, copy) NSNumber *numberOfAudioChannels; 25 | 26 | @property(nonatomic, assign) id delegate; 27 | 28 | - (void)startRecordingScreen; 29 | - (void)stopRecordingScreen; 30 | 31 | @end 32 | 33 | @protocol CSScreenRecorderDelegate 34 | @optional 35 | - (void)screenRecorderDidStartRecording:(CSScreenRecorder *)recorder; 36 | - (void)screenRecorderDidStopRecording:(CSScreenRecorder *)recorder; 37 | // Called every second. 38 | - (void)screenRecorder:(CSScreenRecorder *)recorder recordingTimeChanged:(NSTimeInterval)recordingTime; // time in seconds since start of capture 39 | 40 | - (void)screenRecorder:(CSScreenRecorder *)recorder videoContextSetupFailedWithError:(NSError *)error; 41 | - (void)screenRecorder:(CSScreenRecorder *)recorder audioSessionSetupFailedWithError:(NSError *)error; 42 | - (void)screenRecorder:(CSScreenRecorder *)recorder audioRecorderSetupFailedWithError:(NSError *)error; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /RecordMyScreen/Credits.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | name 7 | CoolStar 8 | description 9 | Started the project, and created the initial code. 10 | twitter 11 | coolstarorg 12 | 13 | 14 | name 15 | ProtoSphere 16 | description 17 | Helped transition to encoding the video on-the-fly 18 | twitter 19 | protosphere7 20 | 21 | 22 | name 23 | John Coates 24 | description 25 | Improved the framerate of the video captured, fixed the screen tearing, and made RecordMyScreen usable on <= A4 26 | twitter 27 | punksomething 28 | 29 | 30 | name 31 | Brandon Etheredge 32 | description 33 | Added support for the iPad on the UI 34 | twitter 35 | brandonEtheredg 36 | 37 | 38 | name 39 | Nicholas Gomolion 40 | description 41 | Prevented other apps from stopping our recording (unfortunately using an iOS 6 only API) 42 | 43 | 44 | name 45 | Aditya KD 46 | description 47 | Moved recording stuff into a separate class, making it easier for us to make the tweak version. 48 | twitter 49 | caughtinflux 50 | 51 | 52 | name 53 | MPow 54 | description 55 | Add Video Editing Feature 56 | twitter 57 | ManzoPower 58 | 59 | 60 | name 61 | David Gölzhäuser 62 | description 63 | Added iPad Mini support 64 | twitter 65 | idoodler 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /RecordMyScreen/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/Default-568h@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKAppSettingsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKAppSettingsViewController.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | #import 19 | 20 | #import "IASKSettingsStore.h" 21 | #import "IASKViewController.h" 22 | #import "IASKSpecifier.h" 23 | 24 | @class IASKSettingsReader; 25 | @class IASKAppSettingsViewController; 26 | 27 | @protocol IASKSettingsDelegate 28 | - (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender; 29 | 30 | @optional 31 | #pragma mark - UITableView header customization 32 | - (CGFloat) settingsViewController:(id)settingsViewController 33 | tableView:(UITableView *)tableView 34 | heightForHeaderForSection:(NSInteger)section; 35 | - (UIView *) settingsViewController:(id)settingsViewController 36 | tableView:(UITableView *)tableView 37 | viewForHeaderForSection:(NSInteger)section; 38 | 39 | #pragma mark - UITableView cell customization 40 | - (CGFloat)tableView:(UITableView*)tableView heightForSpecifier:(IASKSpecifier*)specifier; 41 | - (UITableViewCell*)tableView:(UITableView*)tableView cellForSpecifier:(IASKSpecifier*)specifier; 42 | 43 | #pragma mark - mail composing customization 44 | - (NSString*) settingsViewController:(id)settingsViewController 45 | mailComposeBodyForSpecifier:(IASKSpecifier*) specifier; 46 | 47 | - (UIViewController*) settingsViewController:(id)settingsViewController 48 | viewControllerForMailComposeViewForSpecifier:(IASKSpecifier*) specifier; 49 | 50 | - (void) settingsViewController:(id) settingsViewController 51 | mailComposeController:(MFMailComposeViewController*)controller 52 | didFinishWithResult:(MFMailComposeResult)result 53 | error:(NSError*)error; 54 | 55 | #pragma mark - respond to button taps 56 | - (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForKey:(NSString*)key __attribute__((deprecated)); // use the method below with specifier instead 57 | - (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier; 58 | - (void)settingsViewController:(IASKAppSettingsViewController*)sender tableView:(UITableView *)tableView didSelectCustomViewSpecifier:(IASKSpecifier*)specifier; 59 | @end 60 | 61 | 62 | @interface IASKAppSettingsViewController : UITableViewController { 63 | id _delegate; 64 | 65 | NSMutableArray *_viewList; 66 | 67 | IASKSettingsReader *_settingsReader; 68 | id _settingsStore; 69 | NSString *_file; 70 | 71 | id _currentFirstResponder; 72 | 73 | BOOL _showCreditsFooter; 74 | BOOL _showDoneButton; 75 | 76 | NSSet *_hiddenKeys; 77 | } 78 | 79 | @property (nonatomic, assign) IBOutlet id delegate; 80 | @property (nonatomic, copy) NSString *file; 81 | @property (nonatomic, assign) BOOL showCreditsFooter; 82 | @property (nonatomic, assign) BOOL showDoneButton; 83 | @property (nonatomic, retain) NSSet *hiddenKeys; 84 | 85 | - (void)synchronizeSettings; 86 | - (void)dismiss:(id)sender; 87 | - (void)setHiddenKeys:(NSSet*)hiddenKeys animated:(BOOL)animated; 88 | @end 89 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKAppSettingsWebViewController.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | #import 19 | 20 | @interface IASKAppSettingsWebViewController : UIViewController { 21 | UIWebView *webView; 22 | NSURL *url; 23 | } 24 | 25 | - (id)initWithFile:(NSString*)htmlFileName key:(NSString*)key; 26 | 27 | @property (nonatomic, retain) UIWebView *webView; 28 | @property (nonatomic, retain) NSURL *url; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKAppSettingsWebViewController.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKAppSettingsWebViewController.h" 18 | 19 | @implementation IASKAppSettingsWebViewController 20 | 21 | @synthesize url; 22 | @synthesize webView; 23 | 24 | - (id)initWithFile:(NSString*)urlString key:(NSString*)key { 25 | self = [super init]; 26 | if (self) { 27 | self.url = [NSURL URLWithString:urlString]; 28 | if (!self.url || ![self.url scheme]) { 29 | NSString *path = [[NSBundle mainBundle] pathForResource:[urlString stringByDeletingPathExtension] ofType:[urlString pathExtension]]; 30 | if(path) 31 | self.url = [NSURL fileURLWithPath:path]; 32 | else 33 | self.url = nil; 34 | } 35 | } 36 | return self; 37 | } 38 | 39 | - (void)loadView 40 | { 41 | webView = [[UIWebView alloc] init]; 42 | webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | 43 | UIViewAutoresizingFlexibleHeight; 44 | webView.delegate = self; 45 | 46 | self.view = webView; 47 | } 48 | 49 | - (void)dealloc { 50 | [webView release], webView = nil; 51 | [url release], url = nil; 52 | 53 | [super dealloc]; 54 | } 55 | 56 | - (void)viewWillAppear:(BOOL)animated { 57 | [webView loadRequest:[NSURLRequest requestWithURL:self.url]]; 58 | } 59 | 60 | - (void)viewDidUnload { 61 | [super viewDidUnload]; 62 | self.webView = nil; 63 | } 64 | 65 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 66 | return YES; 67 | } 68 | 69 | - (void)webViewDidFinishLoad:(UIWebView *)webView { 70 | self.navigationItem.title = [self.webView stringByEvaluatingJavaScriptFromString:@"document.title"]; 71 | } 72 | 73 | - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { 74 | NSURL *newURL = [request URL]; 75 | 76 | // intercept mailto URL and send it to an in-app Mail compose view instead 77 | if ([[newURL scheme] isEqualToString:@"mailto"]) { 78 | 79 | NSArray *rawURLparts = [[newURL resourceSpecifier] componentsSeparatedByString:@"?"]; 80 | if (rawURLparts.count > 2) { 81 | return NO; // invalid URL 82 | } 83 | 84 | MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; 85 | mailViewController.mailComposeDelegate = self; 86 | 87 | NSMutableArray *toRecipients = [NSMutableArray array]; 88 | NSString *defaultRecipient = [rawURLparts objectAtIndex:0]; 89 | if (defaultRecipient.length) { 90 | [toRecipients addObject:defaultRecipient]; 91 | } 92 | 93 | if (rawURLparts.count == 2) { 94 | NSString *queryString = [rawURLparts objectAtIndex:1]; 95 | 96 | NSArray *params = [queryString componentsSeparatedByString:@"&"]; 97 | for (NSString *param in params) { 98 | NSArray *keyValue = [param componentsSeparatedByString:@"="]; 99 | if (keyValue.count != 2) { 100 | continue; 101 | } 102 | NSString *key = [[keyValue objectAtIndex:0] lowercaseString]; 103 | NSString *value = [keyValue objectAtIndex:1]; 104 | 105 | value = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault, 106 | (CFStringRef)value, 107 | CFSTR(""), 108 | kCFStringEncodingUTF8); 109 | [value autorelease]; 110 | 111 | if ([key isEqualToString:@"subject"]) { 112 | [mailViewController setSubject:value]; 113 | } 114 | 115 | if ([key isEqualToString:@"body"]) { 116 | [mailViewController setMessageBody:value isHTML:NO]; 117 | } 118 | 119 | if ([key isEqualToString:@"to"]) { 120 | [toRecipients addObjectsFromArray:[value componentsSeparatedByString:@","]]; 121 | } 122 | 123 | if ([key isEqualToString:@"cc"]) { 124 | NSArray *recipients = [value componentsSeparatedByString:@","]; 125 | [mailViewController setCcRecipients:recipients]; 126 | } 127 | 128 | if ([key isEqualToString:@"bcc"]) { 129 | NSArray *recipients = [value componentsSeparatedByString:@","]; 130 | [mailViewController setBccRecipients:recipients]; 131 | } 132 | } 133 | } 134 | 135 | [mailViewController setToRecipients:toRecipients]; 136 | 137 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000) 138 | #pragma message "Now that we're iOS5 and up, remove this workaround" 139 | #endif 140 | if([self respondsToSelector:@selector(presentViewController:animated:completion:)]) { 141 | [self presentViewController:mailViewController 142 | animated:YES 143 | completion:nil]; 144 | } else { 145 | #pragma clang diagnostic push 146 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 147 | [self presentModalViewController:mailViewController animated:YES]; 148 | #pragma clang diagnostic pop 149 | } 150 | [mailViewController release]; 151 | return NO; 152 | } 153 | 154 | // open inline if host is the same, otherwise, pass to the system 155 | if (![newURL host] || [[newURL host] isEqualToString:[self.url host]]) { 156 | return YES; 157 | } 158 | [[UIApplication sharedApplication] openURL:newURL]; 159 | return NO; 160 | } 161 | 162 | - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { 163 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000) 164 | #pragma message "Now that we're iOS5 and up, remove this workaround" 165 | #endif 166 | if([self respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) { 167 | [self dismissViewControllerAnimated:YES 168 | completion:nil]; 169 | } else { 170 | #pragma clang diagnostic push 171 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 172 | [self dismissModalViewControllerAnimated:YES]; 173 | #pragma clang diagnostic pop 174 | 175 | } 176 | } 177 | 178 | 179 | 180 | @end 181 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSpecifierValuesViewController.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | #import "IASKSettingsStore.h" 19 | #import "IASKViewController.h" 20 | @class IASKSpecifier; 21 | @class IASKSettingsReader; 22 | 23 | @interface IASKSpecifierValuesViewController : UIViewController { 24 | UITableView *_tableView; 25 | 26 | IASKSpecifier *_currentSpecifier; 27 | NSIndexPath *_checkedItem; 28 | IASKSettingsReader *_settingsReader; 29 | id _settingsStore; 30 | } 31 | 32 | @property (nonatomic, retain) UITableView *tableView; 33 | @property (nonatomic, retain) NSIndexPath *checkedItem; 34 | @property (nonatomic, retain) IASKSpecifier *currentSpecifier; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSpecifierValuesViewController.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKSpecifierValuesViewController.h" 18 | #import "IASKSpecifier.h" 19 | #import "IASKSettingsReader.h" 20 | #import "IASKSettingsStoreUserDefaults.h" 21 | 22 | #define kCellValue @"kCellValue" 23 | 24 | @interface IASKSpecifierValuesViewController() 25 | - (void)userDefaultsDidChange; 26 | @end 27 | 28 | @implementation IASKSpecifierValuesViewController 29 | 30 | @synthesize tableView=_tableView; 31 | @synthesize currentSpecifier=_currentSpecifier; 32 | @synthesize checkedItem=_checkedItem; 33 | @synthesize settingsReader = _settingsReader; 34 | @synthesize settingsStore = _settingsStore; 35 | 36 | - (void) updateCheckedItem { 37 | NSInteger index; 38 | 39 | // Find the currently checked item 40 | if([self.settingsStore objectForKey:[_currentSpecifier key]]) { 41 | index = [[_currentSpecifier multipleValues] indexOfObject:[self.settingsStore objectForKey:[_currentSpecifier key]]]; 42 | } else { 43 | index = [[_currentSpecifier multipleValues] indexOfObject:[_currentSpecifier defaultValue]]; 44 | } 45 | [self setCheckedItem:[NSIndexPath indexPathForRow:index inSection:0]]; 46 | } 47 | 48 | - (id)settingsStore { 49 | if(_settingsStore == nil) { 50 | _settingsStore = [[IASKSettingsStoreUserDefaults alloc] init]; 51 | } 52 | return _settingsStore; 53 | } 54 | 55 | - (void)loadView 56 | { 57 | _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; 58 | _tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | 59 | UIViewAutoresizingFlexibleHeight; 60 | _tableView.delegate = self; 61 | _tableView.dataSource = self; 62 | 63 | self.view = _tableView; 64 | } 65 | 66 | - (void)viewWillAppear:(BOOL)animated { 67 | if (_currentSpecifier) { 68 | [self setTitle:[_currentSpecifier title]]; 69 | [self updateCheckedItem]; 70 | } 71 | 72 | if (_tableView) { 73 | [_tableView reloadData]; 74 | 75 | // Make sure the currently checked item is visible 76 | [_tableView scrollToRowAtIndexPath:[self checkedItem] atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; 77 | } 78 | [super viewWillAppear:animated]; 79 | } 80 | 81 | - (void)viewDidAppear:(BOOL)animated { 82 | [_tableView flashScrollIndicators]; 83 | [super viewDidAppear:animated]; 84 | [[NSNotificationCenter defaultCenter] addObserver:self 85 | selector:@selector(userDefaultsDidChange) 86 | name:NSUserDefaultsDidChangeNotification 87 | object:[NSUserDefaults standardUserDefaults]]; 88 | } 89 | 90 | - (void)viewDidDisappear:(BOOL)animated { 91 | [[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:nil]; 92 | [super viewDidDisappear:animated]; 93 | } 94 | 95 | 96 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 97 | return YES; 98 | } 99 | 100 | - (void)didReceiveMemoryWarning { 101 | // Releases the view if it doesn't have a superview. 102 | [super didReceiveMemoryWarning]; 103 | 104 | // Release any cached data, images, etc that aren't in use. 105 | } 106 | 107 | - (void)viewDidUnload { 108 | // Release any retained subviews of the main view. 109 | // e.g. self.myOutlet = nil; 110 | self.tableView = nil; 111 | } 112 | 113 | 114 | - (void)dealloc { 115 | [_currentSpecifier release], _currentSpecifier = nil; 116 | [_checkedItem release], _checkedItem = nil; 117 | [_settingsReader release], _settingsReader = nil; 118 | [_settingsStore release], _settingsStore = nil; 119 | [_tableView release], _tableView = nil; 120 | [super dealloc]; 121 | } 122 | 123 | 124 | #pragma mark - 125 | #pragma mark UITableView delegates 126 | 127 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 128 | return 1; 129 | } 130 | 131 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 132 | return [_currentSpecifier multipleValuesCount]; 133 | } 134 | 135 | - (void)selectCell:(UITableViewCell *)cell { 136 | [cell setAccessoryType:UITableViewCellAccessoryCheckmark]; 137 | [[cell textLabel] setTextColor:kIASKgrayBlueColor]; 138 | } 139 | 140 | - (void)deselectCell:(UITableViewCell *)cell { 141 | [cell setAccessoryType:UITableViewCellAccessoryNone]; 142 | [[cell textLabel] setTextColor:[UIColor darkTextColor]]; 143 | } 144 | 145 | - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { 146 | return [_currentSpecifier footerText]; 147 | } 148 | 149 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 150 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellValue]; 151 | NSArray *titles = [_currentSpecifier multipleTitles]; 152 | 153 | if (!cell) { 154 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kCellValue] autorelease]; 155 | } 156 | 157 | if ([indexPath isEqual:[self checkedItem]]) { 158 | [self selectCell:cell]; 159 | } else { 160 | [self deselectCell:cell]; 161 | } 162 | 163 | @try { 164 | [[cell textLabel] setText:[self.settingsReader titleForStringId:[titles objectAtIndex:indexPath.row]]]; 165 | } 166 | @catch (NSException * e) {} 167 | return cell; 168 | } 169 | 170 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 171 | 172 | if (indexPath == [self checkedItem]) { 173 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 174 | return; 175 | } 176 | 177 | NSArray *values = [_currentSpecifier multipleValues]; 178 | 179 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 180 | [self deselectCell:[tableView cellForRowAtIndexPath:[self checkedItem]]]; 181 | [self selectCell:[tableView cellForRowAtIndexPath:indexPath]]; 182 | [self setCheckedItem:indexPath]; 183 | 184 | [self.settingsStore setObject:[values objectAtIndex:indexPath.row] forKey:[_currentSpecifier key]]; 185 | [self.settingsStore synchronize]; 186 | [[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged 187 | object:[_currentSpecifier key] 188 | userInfo:[NSDictionary dictionaryWithObject:[values objectAtIndex:indexPath.row] 189 | forKey:[_currentSpecifier key]]]; 190 | } 191 | 192 | - (CGSize)contentSizeForViewInPopover { 193 | return [[self view] sizeThatFits:CGSizeMake(320, 2000)]; 194 | } 195 | 196 | 197 | #pragma mark Notifications 198 | 199 | - (void)userDefaultsDidChange { 200 | NSIndexPath *oldCheckedItem = [[self.checkedItem retain] autorelease]; 201 | if(_currentSpecifier) { 202 | [self updateCheckedItem]; 203 | } 204 | 205 | // only reload the table if it had changed; prevents animation cancellation 206 | if (![self.checkedItem isEqual:oldCheckedItem]) { 207 | [_tableView reloadData]; 208 | } 209 | } 210 | 211 | @end 212 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Controllers/IASKViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKAppSettingsViewController.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | @class IASKSettingsReader; 18 | @protocol IASKSettingsStore; 19 | 20 | // protocol all IASK view controllers implement 21 | @protocol IASKViewController 22 | 23 | @property (nonatomic, retain) IASKSettingsReader* settingsReader; 24 | @property (nonatomic, retain) id settingsStore; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/IOSurface/IOSurface.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _IOSURFACE_H 4 | #define _IOSURFACE_H 1 5 | 6 | #include 7 | #define IOSFC_AVAILABLE_STARTING(mac, iphone) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0) 8 | 9 | #include 10 | #include 11 | 12 | /* 13 | Cannot find "IOSurfaceAPI.h"? Since it is not free or open source, the file is 14 | not put here. Nevertheless, if you're using Mac OS X 10.6, you can get a copy 15 | from 16 | 17 | /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h 18 | 19 | */ 20 | #include 21 | #include 22 | 23 | #if __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void IOSurfaceFlushProcessorCaches(IOSurfaceRef surface); 28 | 29 | #if __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/IOSurface/IOSurfaceAccelerator.h: -------------------------------------------------------------------------------- 1 | #ifndef _IOSURFACE_ACCELERATOR_H 2 | #define _IOSURFACE_ACCELERATOR_H 1 3 | 4 | #include 5 | #include 6 | 7 | #if __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef IOReturn IOSurfaceAcceleratorReturn; 12 | 13 | enum { 14 | kIOSurfaceAcceleratorSuccess = 0, 15 | }; 16 | 17 | typedef struct __IOSurfaceAccelerator *IOSurfaceAcceleratorRef; 18 | 19 | IOSurfaceAcceleratorReturn IOSurfaceAcceleratorCreate(CFAllocatorRef allocator, uint32_t type, IOSurfaceAcceleratorRef *outAccelerator); 20 | IOSurfaceAcceleratorReturn IOSurfaceAcceleratorTransferSurface(IOSurfaceAcceleratorRef accelerator, IOSurfaceRef sourceSurface, IOSurfaceRef destSurface, CFDictionaryRef dict, void *unknown); 21 | 22 | #if __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/IOSurface/IOSurfaceBase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/InAppSettingsKit/IOSurface/IOSurfaceBase.h -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/IOSurface/IOSurfaceClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IOSurfaceClient.h ... IOSurface Client 4 | 5 | Copyright (c) 2010 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef IOSURFACE_IOSURFACECLIENT_H 34 | #define IOSURFACE_IOSURFACECLIENT_H 35 | 36 | #if __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #if 0 41 | struct IOSurfaceClientUnknown { 42 | int x00; 43 | int x04; 44 | size_t seed; 45 | size_t inUse; 46 | }; 47 | #endif 48 | 49 | typedef struct __IOSurfaceClient 50 | #if 0 51 | { 52 | void* isa; // 0 53 | size_t useCount; // 4 54 | void* address; // 8 55 | IOSurfaceClientID _id; // c 56 | size_t allocSize; // 10 57 | size_t width; // 14 58 | size_t height; // 18 59 | size_t bytesPerRow; // 1c 60 | int offset; // 20 61 | OSType pixelFormat; // 24 62 | size_t planeCount; // 2c 63 | uint16_t bytesPerElement; // 34 64 | uint8_t elementWidth; // 36 65 | uint8_t elementHeight; // 37 66 | struct IOSurfaceClientUnknown* unknown; // 3c 67 | struct { 68 | struct IOSurfaceClientUnknown* unknown; // 40 69 | size_t width; // 44 70 | size_t height; // 48 71 | int offset; // 50 72 | size_t bytesPerRow; // 54 73 | uint16_t bytesPerElement; // 5c 74 | uint8_t elementWidth; // 5e 75 | uint8_t elementHeight; // 5f 76 | } planes[]; 77 | } 78 | #endif 79 | IOSurfaceClientRef; 80 | 81 | typedef uint32_t IOSurfaceClientID; 82 | 83 | #pragma mark Accessors 84 | IOSurfaceClientID IOSurfaceClientGetID(IOSurfaceClientRef client); 85 | size_t IOSurfaceClientGetAllocSize(IOSurfaceClientRef client); 86 | size_t IOSurfaceClientGetWidth(IOSurfaceClientRef client); 87 | size_t IOSurfaceClientGetHeight(IOSurfaceClientRef client); 88 | size_t IOSurfaceClientGetBytesPerRow(IOSurfaceClientRef client); 89 | uint16_t IOSurfaceClientGetBytesPerElement(IOSurfaceClientRef client); 90 | uint8_t IOSurfaceClientGetElementWidth(IOSurfaceClientRef client); 91 | uint8_t IOSurfaceClientGetElementHeight(IOSurfaceClientRef client); 92 | OSType IOSurfaceClientGetPixelFormat(IOSurfaceClientRef client); 93 | void* IOSurfaceClientGetBaseAddress(IOSurfaceClientRef client); // return address + offset. 94 | uint32_t IOSurfaceClientGetSeed(IOSurfaceClientRef client); 95 | 96 | uint32_t IOSurfaceClientGetUseCount(IOSurfaceClientRef client); 97 | bool IOSurfaceClientIsInUse(IOSurfaceClientRef client); 98 | 99 | #pragma mark Accessors for planes 100 | size_t IOSurfaceClientGetPlaneCount(IOSurfaceClientRef client); 101 | size_t IOSurfaceClientGetWidthOfPlane(IOSurfaceClientRef client, size_t planeIndex); 102 | size_t IOSurfaceClientGetHeightOfPlane(IOSurfaceClientRef client, size_t planeIndex); 103 | size_t IOSurfaceClientGetBytesPerRowOfPlane(IOSurfaceClientRef client, size_t planeIndex); 104 | uint16_t IOSurfaceClientGetBytesPerElementOfPlane(IOSurfaceClientRef client, size_t planeIndex); 105 | uint8_t IOSurfaceClientGetElementWidthOfPlane(IOSurfaceClientRef client, size_t planeIndex); 106 | uint8_t IOSurfaceClientGetElementHeightOfPlane(IOSurfaceClientRef client, size_t planeIndex); 107 | void* IOSurfaceClientGetBaseAddressOfPlane(IOSurfaceClientRef client, size_t planeIndex); 108 | uint32_t IOSurfaceClientGetSeedOfPlane(IOSurfaceClientRef client, size_t planeIndex); 109 | 110 | #pragma mark Actions 111 | void IOSurfaceClientDecrementUseCount(IOSurfaceClientRef client); 112 | void IOSurfaceClientIncrementUseCount(IOSurfaceClientRef client); 113 | 114 | void IOSurfaceClientRemoveSurfaceNotify(IOSurfaceClientRef client); 115 | 116 | #if __cplusplus 117 | } 118 | #endif 119 | 120 | #endif -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStore.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import 19 | 20 | /** protocol that needs to be implemented from a settings store 21 | */ 22 | @protocol IASKSettingsStore 23 | @required 24 | - (void)setBool:(BOOL)value forKey:(NSString*)key; 25 | - (void)setFloat:(float)value forKey:(NSString*)key; 26 | - (void)setDouble:(double)value forKey:(NSString*)key; 27 | - (void)setInteger:(int)value forKey:(NSString*)key; 28 | - (void)setObject:(id)value forKey:(NSString*)key; 29 | - (BOOL)boolForKey:(NSString*)key; 30 | - (float)floatForKey:(NSString*)key; 31 | - (double)doubleForKey:(NSString*)key; 32 | - (int)integerForKey:(NSString*)key; 33 | - (id)objectForKey:(NSString*)key; 34 | - (BOOL)synchronize; // Write settings to a permanant storage. Returns YES on success, NO otherwise 35 | @end 36 | 37 | 38 | /** abstract default implementation of IASKSettingsStore protocol 39 | 40 | helper to implement a store which maps all methods to setObject:forKey: 41 | and objectForKey:. Those 2 methods need to be overwritten. 42 | */ 43 | @interface IASKAbstractSettingsStore : NSObject 44 | 45 | /** default implementation raises an exception 46 | must be overridden by subclasses 47 | */ 48 | - (void)setObject:(id)value forKey:(NSString*)key; 49 | 50 | /** default implementation raises an exception 51 | must be overridden by subclasses 52 | */ 53 | - (id)objectForKey:(NSString*)key; 54 | 55 | /** default implementation does nothing and returns NO 56 | */ 57 | - (BOOL)synchronize; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStore.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStore.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import "IASKSettingsStore.h" 19 | 20 | @implementation IASKAbstractSettingsStore 21 | 22 | - (void)setObject:(id)value forKey:(NSString*)key { 23 | [NSException raise:@"Unimplemented" 24 | format:@"setObject:forKey: must be implemented in subclasses of IASKAbstractSettingsStore"]; 25 | } 26 | 27 | - (id)objectForKey:(NSString*)key { 28 | [NSException raise:@"Unimplemented" 29 | format:@"objectForKey: must be implemented in subclasses of IASKAbstractSettingsStore"]; 30 | return nil; 31 | } 32 | 33 | - (void)setBool:(BOOL)value forKey:(NSString*)key { 34 | [self setObject:[NSNumber numberWithBool:value] forKey:key]; 35 | } 36 | 37 | - (void)setFloat:(float)value forKey:(NSString*)key { 38 | [self setObject:[NSNumber numberWithFloat:value] forKey:key]; 39 | } 40 | 41 | - (void)setInteger:(int)value forKey:(NSString*)key { 42 | [self setObject:[NSNumber numberWithInt:value] forKey:key]; 43 | } 44 | 45 | - (void)setDouble:(double)value forKey:(NSString*)key { 46 | [self setObject:[NSNumber numberWithDouble:value] forKey:key]; 47 | } 48 | 49 | - (BOOL)boolForKey:(NSString*)key { 50 | return [[self objectForKey:key] boolValue]; 51 | } 52 | 53 | - (float)floatForKey:(NSString*)key { 54 | return [[self objectForKey:key] floatValue]; 55 | } 56 | - (int)integerForKey:(NSString*)key { 57 | return [[self objectForKey:key] intValue]; 58 | } 59 | 60 | - (double)doubleForKey:(NSString*)key { 61 | return [[self objectForKey:key] doubleValue]; 62 | } 63 | 64 | - (BOOL)synchronize { 65 | return NO; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStoreFile.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStoreFile.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import 19 | #import "IASKSettingsStore.h" 20 | 21 | /** file-based implementation of IASKAbstractSettingsStore 22 | 23 | uses an NSDictionary + its read/write to file support to store 24 | settings in a file at the specified path 25 | */ 26 | @interface IASKSettingsStoreFile : IASKAbstractSettingsStore 27 | 28 | /** designated initializer 29 | 30 | @param path absolute file-path to store settings dictionary 31 | */ 32 | - (id)initWithPath:(NSString*)path; 33 | 34 | @property (nonatomic, retain, readonly) NSString* filePath; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStoreFile.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStoreFile.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import "IASKSettingsStoreFile.h" 19 | 20 | @interface IASKSettingsStoreFile() { 21 | NSMutableDictionary * _dict; 22 | } 23 | 24 | @property (nonatomic, retain, readwrite) NSString* filePath; 25 | 26 | @end 27 | 28 | @implementation IASKSettingsStoreFile 29 | 30 | - (id)initWithPath:(NSString*)path { 31 | if((self = [super init])) { 32 | _filePath = [path retain]; 33 | _dict = [[NSMutableDictionary alloc] initWithContentsOfFile:path]; 34 | if(_dict == nil) { 35 | _dict = [[NSMutableDictionary alloc] init]; 36 | } 37 | } 38 | return self; 39 | } 40 | 41 | - (void)dealloc { 42 | [_dict release], _dict = nil; 43 | [_filePath release], _filePath = nil; 44 | 45 | [super dealloc]; 46 | } 47 | 48 | - (void)setObject:(id)value forKey:(NSString *)key { 49 | [_dict setObject:value forKey:key]; 50 | } 51 | 52 | - (id)objectForKey:(NSString *)key { 53 | return [_dict objectForKey:key]; 54 | } 55 | 56 | - (BOOL)synchronize { 57 | return [_dict writeToFile:_filePath atomically:YES]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStoreUserDefaults.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import 19 | #import "IASKSettingsStore.h" 20 | 21 | /** implementation of IASKSettingsStore that uses NSUserDefaults 22 | */ 23 | @interface IASKSettingsStoreUserDefaults : NSObject 24 | 25 | ///designated initializer 26 | - (id) initWithUserDefaults:(NSUserDefaults*) defaults; 27 | 28 | ///calls initWithUserDefaults: with [NSUserDefaults standardUserDefaults] 29 | - (id) init; 30 | 31 | @property (nonatomic, retain, readonly) NSUserDefaults* defaults; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSettingsStoreUserDefaults.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com 9 | // All rights reserved. 10 | // 11 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 12 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 13 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 14 | // 15 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 16 | // 17 | 18 | #import "IASKSettingsStoreUserDefaults.h" 19 | 20 | @interface IASKSettingsStoreUserDefaults () 21 | 22 | @property (nonatomic, retain, readwrite) NSUserDefaults* defaults; 23 | 24 | @end 25 | 26 | @implementation IASKSettingsStoreUserDefaults 27 | 28 | - (void)dealloc { 29 | [_defaults release]; 30 | [super dealloc]; 31 | } 32 | 33 | - (id)initWithUserDefaults:(NSUserDefaults *)defaults { 34 | self = [super init]; 35 | if( self ) { 36 | _defaults = [defaults retain]; 37 | } 38 | return self; 39 | } 40 | 41 | - (id)init { 42 | return [self initWithUserDefaults:[NSUserDefaults standardUserDefaults]]; 43 | } 44 | 45 | - (void)setBool:(BOOL)value forKey:(NSString*)key { 46 | [self.defaults setBool:value forKey:key]; 47 | } 48 | 49 | - (void)setFloat:(float)value forKey:(NSString*)key { 50 | [self.defaults setFloat:value forKey:key]; 51 | } 52 | 53 | - (void)setDouble:(double)value forKey:(NSString*)key { 54 | [self.defaults setDouble:value forKey:key]; 55 | } 56 | 57 | - (void)setInteger:(int)value forKey:(NSString*)key { 58 | [self.defaults setInteger:value forKey:key]; 59 | } 60 | 61 | - (void)setObject:(id)value forKey:(NSString*)key { 62 | [self.defaults setObject:value forKey:key]; 63 | } 64 | 65 | - (BOOL)boolForKey:(NSString*)key { 66 | return [self.defaults boolForKey:key]; 67 | } 68 | 69 | - (float)floatForKey:(NSString*)key { 70 | return [self.defaults floatForKey:key]; 71 | } 72 | 73 | - (double)doubleForKey:(NSString*)key { 74 | return [self.defaults doubleForKey:key]; 75 | } 76 | 77 | - (int)integerForKey:(NSString*)key { 78 | return [self.defaults integerForKey:key]; 79 | } 80 | 81 | - (id)objectForKey:(NSString*)key { 82 | return [self.defaults objectForKey:key]; 83 | } 84 | 85 | - (BOOL)synchronize { 86 | return [self.defaults synchronize]; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Models/IASKSpecifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSpecifier.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | #import 19 | 20 | @class IASKSettingsReader; 21 | 22 | @interface IASKSpecifier : NSObject { 23 | NSDictionary *_specifierDict; 24 | NSDictionary *_multipleValuesDict; 25 | IASKSettingsReader *_settingsReader; 26 | } 27 | @property (nonatomic, retain) NSDictionary *specifierDict; 28 | @property (nonatomic, assign) IASKSettingsReader *settingsReader; 29 | 30 | - (id)initWithSpecifier:(NSDictionary*)specifier; 31 | - (NSString*)localizedObjectForKey:(NSString*)key; 32 | - (NSString*)title; 33 | - (NSString*)key; 34 | - (NSString*)type; 35 | - (NSString*)titleForCurrentValue:(id)currentValue; 36 | - (NSInteger)multipleValuesCount; 37 | - (NSArray*)multipleValues; 38 | - (NSArray*)multipleTitles; 39 | - (NSString*)file; 40 | - (id)defaultValue; 41 | - (id)defaultStringValue; 42 | - (BOOL)defaultBoolValue; 43 | - (id)trueValue; 44 | - (id)falseValue; 45 | - (float)minimumValue; 46 | - (float)maximumValue; 47 | - (NSString*)minimumValueImage; 48 | - (NSString*)maximumValueImage; 49 | - (BOOL)isSecure; 50 | - (UIKeyboardType)keyboardType; 51 | - (UITextAutocapitalizationType)autocapitalizationType; 52 | - (UITextAutocorrectionType)autoCorrectionType; 53 | - (NSString*)footerText; 54 | - (Class)viewControllerClass; 55 | - (SEL)viewControllerSelector; 56 | -(Class)buttonClass; 57 | -(SEL)buttonAction; 58 | - (UIImage *)cellImage; 59 | - (UIImage *)highlightedCellImage; 60 | - (BOOL)adjustsFontSizeToFitWidth; 61 | - (UITextAlignment)textAlignment; 62 | @end 63 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSSliderSpecifierViewCell.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | @class IASKSlider; 20 | 21 | @interface IASKPSSliderSpecifierViewCell : UITableViewCell { 22 | IASKSlider *_slider; 23 | UIImageView *_minImage; 24 | UIImageView *_maxImage; 25 | } 26 | 27 | @property (nonatomic, assign) IASKSlider *slider; 28 | @property (nonatomic, assign) UIImageView *minImage; 29 | @property (nonatomic, assign) UIImageView *maxImage; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSSliderSpecifierViewCell.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009-2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKPSSliderSpecifierViewCell.h" 18 | #import "IASKSlider.h" 19 | #import "IASKSettingsReader.h" 20 | 21 | @implementation IASKPSSliderSpecifierViewCell 22 | 23 | @synthesize slider=_slider, 24 | minImage=_minImage, 25 | maxImage=_maxImage; 26 | 27 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 28 | { 29 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 30 | if (self) { 31 | // Setting only frame data that will not be overwritten by layoutSubviews 32 | // Slider 33 | _slider = [[[IASKSlider alloc] initWithFrame:CGRectMake(0, 0, 0, 23)] autorelease]; 34 | _slider.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | 35 | UIViewAutoresizingFlexibleWidth; 36 | _slider.continuous = NO; 37 | [self.contentView addSubview:_slider]; 38 | 39 | // MinImage 40 | _minImage = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 21, 21)] autorelease]; 41 | _minImage.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | 42 | UIViewAutoresizingFlexibleBottomMargin; 43 | [self.contentView addSubview:_minImage]; 44 | 45 | // MaxImage 46 | _maxImage = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 21, 21)] autorelease]; 47 | _maxImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | 48 | UIViewAutoresizingFlexibleBottomMargin; 49 | [self.contentView addSubview:_maxImage]; 50 | 51 | self.selectionStyle = UITableViewCellSelectionStyleNone; 52 | } 53 | return self; 54 | } 55 | 56 | - (void)layoutSubviews { 57 | [super layoutSubviews]; 58 | CGRect sliderBounds = _slider.bounds; 59 | CGPoint sliderCenter = _slider.center; 60 | const double superViewWidth = _slider.superview.frame.size.width; 61 | 62 | sliderCenter.x = superViewWidth / 2; 63 | sliderCenter.y = self.contentView.center.y; 64 | sliderBounds.size.width = superViewWidth - kIASKSliderNoImagesPadding * 2; 65 | _minImage.hidden = YES; 66 | _maxImage.hidden = YES; 67 | 68 | // Check if there are min and max images. If so, change the layout accordingly. 69 | if (_minImage.image) { 70 | // Min image 71 | _minImage.hidden = NO; 72 | sliderCenter.x += (kIASKSliderImagesPadding - kIASKSliderNoImagesPadding) / 2; 73 | sliderBounds.size.width -= (kIASKSliderImagesPadding - kIASKSliderNoImagesPadding); 74 | _minImage.center = CGPointMake(_minImage.frame.size.width / 2 + kIASKPaddingLeft, 75 | self.contentView.center.y); 76 | } 77 | if (_maxImage.image) { 78 | // Max image 79 | _maxImage.hidden = NO; 80 | sliderCenter.x -= (kIASKSliderImagesPadding - kIASKSliderNoImagesPadding) / 2; 81 | sliderBounds.size.width -= (kIASKSliderImagesPadding - kIASKSliderNoImagesPadding); 82 | _maxImage.center = CGPointMake(self.contentView.bounds.size.width - _maxImage.frame.size.width / 2 - kIASKPaddingRight, 83 | self.contentView.center.y); 84 | } 85 | 86 | _slider.bounds = sliderBounds; 87 | _slider.center = sliderCenter; 88 | } 89 | 90 | - (void)dealloc { 91 | _minImage.image = nil; 92 | _maxImage.image = nil; 93 | [super dealloc]; 94 | } 95 | 96 | - (void)prepareForReuse { 97 | _minImage.image = nil; 98 | _maxImage.image = nil; 99 | } 100 | @end 101 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSTextFieldSpecifierViewCell.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | @class IASKTextField; 20 | 21 | @interface IASKPSTextFieldSpecifierViewCell : UITableViewCell { 22 | IASKTextField *_textField; 23 | } 24 | 25 | @property (nonatomic, assign) IASKTextField *textField; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSTextFieldSpecifierViewCell.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009-2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKPSTextFieldSpecifierViewCell.h" 18 | #import "IASKTextField.h" 19 | #import "IASKSettingsReader.h" 20 | 21 | @implementation IASKPSTextFieldSpecifierViewCell 22 | 23 | @synthesize textField=_textField; 24 | 25 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 26 | { 27 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 28 | if (self) { 29 | self.textLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin; 30 | 31 | // TextField 32 | _textField = [[[IASKTextField alloc] initWithFrame:CGRectMake(0, 0, 200, 21)] autorelease]; 33 | _textField.autoresizingMask = UIViewAutoresizingFlexibleWidth | 34 | UIViewAutoresizingFlexibleBottomMargin | 35 | UIViewAutoresizingFlexibleLeftMargin; 36 | _textField.font = [UIFont systemFontOfSize:17.0f]; 37 | _textField.minimumFontSize = kIASKMinimumFontSize; 38 | _textField.textColor = [UIColor colorWithRed:0.275 green:0.376 blue:0.522 alpha:1.000]; 39 | [self.contentView addSubview:_textField]; 40 | 41 | self.selectionStyle = UITableViewCellSelectionStyleNone; 42 | } 43 | return self; 44 | } 45 | 46 | - (void)layoutSubviews { 47 | [super layoutSubviews]; 48 | 49 | // Label 50 | CGFloat imageOffset = self.imageView.image ? self.imageView.bounds.size.width + kIASKPaddingLeft : 0; 51 | CGSize labelSize = [self.textLabel sizeThatFits:CGSizeZero]; 52 | labelSize.width = MAX(labelSize.width, kIASKMinLabelWidth - imageOffset); 53 | self.textLabel.frame = (CGRect){self.textLabel.frame.origin, {MIN(kIASKMaxLabelWidth, labelSize.width), self.textLabel.frame.size.height}} ; 54 | 55 | // TextField 56 | _textField.center = CGPointMake(_textField.center.x, self.contentView.center.y); 57 | CGRect textFieldFrame = _textField.frame; 58 | textFieldFrame.origin.x = self.textLabel.frame.origin.x + MAX(kIASKMinLabelWidth - imageOffset, self.textLabel.frame.size.width) + kIASKSpacing; 59 | textFieldFrame.size.width = _textField.superview.frame.size.width - textFieldFrame.origin.x - kIASKPaddingRight; 60 | 61 | if (!self.textLabel.text.length) { 62 | textFieldFrame.origin.x = kIASKPaddingLeft + imageOffset; 63 | textFieldFrame.size.width = self.contentView.bounds.size.width - 2* kIASKPaddingLeft - imageOffset; 64 | } else if (_textField.textAlignment == NSTextAlignmentRight) { 65 | textFieldFrame.origin.x = self.textLabel.frame.origin.x + labelSize.width + kIASKSpacing; 66 | textFieldFrame.size.width = _textField.superview.frame.size.width - textFieldFrame.origin.x - kIASKPaddingRight; 67 | } 68 | _textField.frame = textFieldFrame; 69 | } 70 | 71 | 72 | - (void)dealloc { 73 | [super dealloc]; 74 | } 75 | 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSTitleValueSpecifierViewCell.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | 20 | @interface IASKPSTitleValueSpecifierViewCell : UITableViewCell 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKPSTitleValueSpecifierViewCell.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2010: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKPSTitleValueSpecifierViewCell.h" 18 | #import "IASKSettingsReader.h" 19 | 20 | 21 | @implementation IASKPSTitleValueSpecifierViewCell 22 | 23 | - (void)layoutSubviews { 24 | [super layoutSubviews]; 25 | 26 | CGSize viewSize = [self.textLabel superview].frame.size; 27 | 28 | // if there's an image, make room for it 29 | CGFloat imageOffset = floor(self.imageView.image ? self.imageView.bounds.size.width + self.imageView.frame.origin.x : 0); 30 | 31 | // set the left title label frame 32 | CGFloat labelWidth = [self.textLabel sizeThatFits:CGSizeZero].width; 33 | CGFloat minValueWidth = (self.detailTextLabel.text.length) ? kIASKMinValueWidth + kIASKSpacing : 0; 34 | labelWidth = MIN(labelWidth, viewSize.width - minValueWidth - kIASKPaddingLeft -kIASKPaddingRight - imageOffset); 35 | CGRect labelFrame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, labelWidth, viewSize.height -2); 36 | if (!self.detailTextLabel.text.length) { 37 | labelFrame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, viewSize.width - kIASKPaddingLeft - kIASKPaddingRight - imageOffset, viewSize.height -2); 38 | } 39 | self.textLabel.frame = labelFrame; 40 | 41 | // set the right value label frame 42 | if (!self.textLabel.text.length) { 43 | viewSize = [self.detailTextLabel superview].frame.size; 44 | self.detailTextLabel.frame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, viewSize.width - kIASKPaddingLeft - kIASKPaddingRight - imageOffset, viewSize.height -2); 45 | } else if (self.detailTextLabel.textAlignment == NSTextAlignmentLeft) { 46 | CGRect valueFrame = self.detailTextLabel.frame; 47 | valueFrame.origin.x = labelFrame.origin.x + MAX(kIASKMinLabelWidth - imageOffset, labelWidth) + kIASKSpacing; 48 | valueFrame.size.width = self.detailTextLabel.superview.frame.size.width - valueFrame.origin.x - kIASKPaddingRight; 49 | self.detailTextLabel.frame = valueFrame; 50 | } 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSlider.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | 20 | @interface IASKSlider : UISlider { 21 | NSString *_key; 22 | } 23 | 24 | @property (nonatomic, retain) NSString *key; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKSlider.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSlider.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKSlider.h" 18 | 19 | 20 | @implementation IASKSlider 21 | 22 | @synthesize key=_key; 23 | 24 | - (void)dealloc { 25 | [_key release], _key = nil; 26 | 27 | [super dealloc]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKSwitch.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSwitch.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | 20 | @interface IASKSwitch : UISwitch { 21 | NSString *_key; 22 | } 23 | 24 | @property (nonatomic, retain) NSString *key; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKSwitch.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKSwitch.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKSwitch.h" 18 | 19 | 20 | @implementation IASKSwitch 21 | 22 | @synthesize key=_key; 23 | 24 | - (void)dealloc { 25 | [_key release], _key = nil; 26 | 27 | [super dealloc]; 28 | } 29 | 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKTextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // IASKTextField.h 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import 18 | 19 | 20 | @interface IASKTextField : UITextField { 21 | NSString *_key; 22 | } 23 | 24 | @property (nonatomic, retain) NSString *key; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /RecordMyScreen/InAppSettingsKit/Views/IASKTextField.m: -------------------------------------------------------------------------------- 1 | // 2 | // IASKTextField.m 3 | // http://www.inappsettingskit.com 4 | // 5 | // Copyright (c) 2009: 6 | // Luc Vandal, Edovia Inc., http://www.edovia.com 7 | // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com 8 | // All rights reserved. 9 | // 10 | // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 11 | // as the original authors of this code. You can give credit in a blog post, a tweet or on 12 | // a info page of your app. Also, the original authors appreciate letting them know if you use this code. 13 | // 14 | // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php 15 | // 16 | 17 | #import "IASKTextField.h" 18 | 19 | 20 | @implementation IASKTextField 21 | 22 | @synthesize key=_key; 23 | 24 | - (void)dealloc { 25 | [_key release], _key = nil; 26 | 27 | [super dealloc]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RecordMyScreen/RecordMyScreen-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIcons 12 | 13 | CFBundlePrimaryIcon 14 | 15 | CFBundleIconFiles 16 | 17 | icon@2x.png 18 | icon.png 19 | icon~ipad.png 20 | icon~ipad@2x.png 21 | 22 | 23 | 24 | CFBundleIdentifier 25 | org.coolstar.${PRODUCT_NAME:rfc1034identifier} 26 | CFBundleInfoDictionaryVersion 27 | 6.0 28 | CFBundleName 29 | ${PRODUCT_NAME} 30 | CFBundlePackageType 31 | APPL 32 | CFBundleShortVersionString 33 | 1.1 34 | CFBundleSignature 35 | ???? 36 | CFBundleVersion 37 | 1.1 38 | LSRequiresIPhoneOS 39 | 40 | UIBackgroundModes 41 | 42 | audio 43 | 44 | UIFileSharingEnabled 45 | 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /RecordMyScreen/RecordMyScreen-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RecordMyScreen' target in the 'RecordMyScreen' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /RecordMyScreen/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/CoreSurface/CoreSurface.h: -------------------------------------------------------------------------------- 1 | #ifndef CORESURFACE_H 2 | #define CORESURFACE_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef void * CoreSurfaceBufferRef; 11 | typedef void * CoreSurfaceAcceleratorRef; 12 | 13 | /* Keys for the CoreSurfaceBufferCreate dictionary. */ 14 | extern CFStringRef kCoreSurfaceBufferGlobal; /* CFBoolean */ 15 | extern CFStringRef kCoreSurfaceBufferMemoryRegion; /* CFStringRef */ 16 | extern CFStringRef kCoreSurfaceBufferPitch; /* CFNumberRef */ 17 | extern CFStringRef kCoreSurfaceBufferWidth; /* CFNumberRef */ 18 | extern CFStringRef kCoreSurfaceBufferHeight; /* CFNumberRef */ 19 | extern CFStringRef kCoreSurfaceBufferPixelFormat; /* CFNumberRef (fourCC) */ 20 | extern CFStringRef kCoreSurfaceBufferAllocSize; /* CFNumberRef */ 21 | extern CFStringRef kCoreSurfaceBufferClientAddress; /* CFNumberRef */ 22 | 23 | CoreSurfaceBufferRef CoreSurfaceBufferCreate(CFDictionaryRef dict); 24 | unsigned int CoreSurfaceBufferGetPixelFormatType(CoreSurfaceBufferRef surface); 25 | unsigned int CoreSurfaceBufferGetID(CoreSurfaceBufferRef surface); 26 | unsigned int CoreSurfaceBufferGetPlaneCount(CoreSurfaceBufferRef surface); 27 | 28 | int CoreSurfaceBufferLock(CoreSurfaceBufferRef surface); 29 | int CoreSurfaceBufferUnlock(CoreSurfaceBufferRef surface); 30 | int CoreSurfaceBufferWrapClientMemory(CoreSurfaceBufferRef surface); 31 | void *CoreSurfaceBufferGetBaseAddress(CoreSurfaceBufferRef surface); 32 | size_t CoreSurfaceBufferGetAllocSize(CoreSurfaceBufferRef surface); 33 | size_t CoreSurfaceBufferGetWidth(CoreSurfaceBufferRef surface); 34 | size_t CoreSurfaceBufferGetHeight(CoreSurfaceBufferRef surface); 35 | size_t CoreSurfaceBufferGetBytesPerRow(CoreSurfaceBufferRef surface); 36 | size_t CoreSurfaceBufferGetBytesPerElement(CoreSurfaceBufferRef surface); 37 | size_t CoreSurfaceBufferGetElementWidth(CoreSurfaceBufferRef surface); 38 | size_t CoreSurfaceBufferGetElementHeight(CoreSurfaceBufferRef surface); 39 | 40 | /* Set type to 0. */ 41 | int CoreSurfaceAcceleratorCreate(CFAllocatorRef allocator, int type, 42 | CoreSurfaceAcceleratorRef *accel); 43 | unsigned int CoreSurfaceAcceleratorTransferSurfaceWithSwap( 44 | CoreSurfaceAcceleratorRef accelerator, CoreSurfaceBufferRef dest, 45 | CoreSurfaceBufferRef src, CFDictionaryRef options); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/Headers/IOSurface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IOSurface.h 3 | * IOSurface 4 | * 5 | * Copyright 2006-2008 Apple Computer, Inc. All rights reserved. 6 | * 7 | */ 8 | 9 | #ifndef _IOSURFACE_H 10 | #define _IOSURFACE_H 1 11 | 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/Headers/IOSurfaceBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IOSurfaceBase.h 3 | * IOSurface 4 | * 5 | * Copyright 2006-2008 Apple, Inc. All rights reserved. 6 | * 7 | */ 8 | 9 | #ifndef _IOSURFACE_BASE_H 10 | #define _IOSURFACE_BASE_H 11 | 12 | #include 13 | 14 | # include 15 | # if defined(MAC_OS_X_VERSION_10_6) 16 | # include 17 | # endif /* defined(MAC_OS_X_VERSION_10_6) */ 18 | 19 | #if !defined(MAC_OS_X_VERSION_10_6) || defined(IOSFC_BUILDING_IOSFC) 20 | # define IOSFC_DEPRECATED 21 | # define IOSFC_AVAILABLE_STARTING(_mac,_iphone) 22 | # define IOSFC_AVAILABLE_BUT_DEPRECATED(_mac,_macDep,_iphone,_iphoneDep) 23 | #else /* !defined(IOSFC_BUILDING_IOSFC) */ 24 | # define IOSFC_DEPRECATED DEPRECATED_ATTRIBUTE 25 | # define IOSFC_AVAILABLE_STARTING __OSX_AVAILABLE_STARTING 26 | # define IOSFC_AVAILABLE_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED 27 | #endif /* !defined(IOSFC_BUILDING_IOSFC) */ 28 | 29 | #include 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOBSD.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | #ifndef _IOBSD_H 29 | #define _IOBSD_H 30 | 31 | /* 32 | * bsd-related registry properties 33 | */ 34 | 35 | #define kIOBSDNameKey "BSD Name" // (an OSString) 36 | #define kIOBSDNamesKey "BSD Names" // (an OSDictionary of OSString's, for links) 37 | #define kIOBSDMajorKey "BSD Major" // (an OSNumber) 38 | #define kIOBSDMinorKey "BSD Minor" // (an OSNumber) 39 | #define kIOBSDUnitKey "BSD Unit" // (an OSNumber) 40 | 41 | #endif /* !_IOBSD_H */ 42 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOCFBundle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef __IOKIT_IOCFBUNDLE_H 24 | #define __IOKIT_IOCFBUNDLE_H 25 | 26 | #include 27 | 28 | #define kIOBundleInfoDictionaryVersionKey CFSTR("CFBundleInfoDictionaryVersion") 29 | #define kIOBundleExecutableKey CFSTR("CFBundleExecutable") 30 | #define kIOBundleIdentifierKey CFSTR("CFBundleIdentifier") 31 | #define kIOBundleVersionKey CFSTR("CFBundleVersion") 32 | #define kIOBundleDevelopmentRegionKey CFSTR("CFBundleDevelopmentRegion") 33 | #define kIOBundleNameKey CFSTR("CFBundleName") 34 | 35 | #endif /* __IOKIT_IOCFBUNDLE_H */ 36 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOCFPlugIn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef _IOKIT_IOCFPLUGIN_H_ 24 | #define _IOKIT_IOCFPLUGIN_H_ 25 | 26 | /* IOCFPlugIn.h 27 | */ 28 | #include 29 | 30 | __BEGIN_DECLS 31 | 32 | #include 33 | #if COREFOUNDATION_CFPLUGINCOM_SEPARATE 34 | #include 35 | #endif 36 | 37 | #include 38 | 39 | /* C244E858-109C-11D4-91D4-0050E4C6426F */ 40 | #define kIOCFPlugInInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ 41 | 0xC2, 0x44, 0xE8, 0x58, 0x10, 0x9C, 0x11, 0xD4, \ 42 | 0x91, 0xD4, 0x00, 0x50, 0xE4, 0xC6, 0x42, 0x6F) 43 | 44 | 45 | #define IOCFPLUGINBASE \ 46 | UInt16 version; \ 47 | UInt16 revision; \ 48 | IOReturn (*Probe)(void *thisPointer, CFDictionaryRef propertyTable, \ 49 | io_service_t service, SInt32 * order); \ 50 | IOReturn (*Start)(void *thisPointer, CFDictionaryRef propertyTable, \ 51 | io_service_t service); \ 52 | IOReturn (*Stop)(void *thisPointer) 53 | 54 | typedef struct IOCFPlugInInterfaceStruct { 55 | IUNKNOWN_C_GUTS; 56 | IOCFPLUGINBASE; 57 | } IOCFPlugInInterface; 58 | 59 | 60 | kern_return_t 61 | IOCreatePlugInInterfaceForService(io_service_t service, 62 | CFUUIDRef pluginType, CFUUIDRef interfaceType, 63 | IOCFPlugInInterface *** theInterface, SInt32 * theScore); 64 | 65 | kern_return_t 66 | IODestroyPlugInInterface(IOCFPlugInInterface ** interface); 67 | 68 | __END_DECLS 69 | 70 | #endif /* !_IOKIT_IOCFPLUGIN_H_ */ 71 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOCFSerialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * HISTORY 25 | * 26 | */ 27 | 28 | /* IOCFSerialize serializes CFObjects to a format suitable for passing 29 | * to the kernel. */ 30 | 31 | #ifndef __IOKIT_IOCFSERIALIZE_H 32 | #define __IOKIT_IOCFSERIALIZE_H 33 | 34 | #include 35 | #include 36 | 37 | #if defined(__cplusplus) 38 | extern "C" { 39 | #endif 40 | 41 | enum { 42 | kIOCFSerializeToBinary = 0x00000001 43 | }; 44 | 45 | CFDataRef 46 | IOCFSerialize( CFTypeRef object, CFOptionFlags options ); 47 | 48 | #if defined(__cplusplus) 49 | } 50 | #endif 51 | 52 | #endif /* __IOKIT_IOCFSERIALIZE_H */ 53 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOCFURLAccess.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef __IOKIT_IOCFURLACCESS_H 24 | #define __IOKIT_IOCFURLACCESS_H 25 | 26 | #include 27 | 28 | CFTypeRef IOURLCreatePropertyFromResource(CFAllocatorRef alloc, CFURLRef url, CFStringRef property, SInt32 *errorCode); 29 | 30 | Boolean IOURLCreateDataAndPropertiesFromResource(CFAllocatorRef alloc, CFURLRef url, CFDataRef *resourceData, CFDictionaryRef *properties, CFArrayRef desiredProperties, SInt32 *errorCode); 31 | 32 | Boolean IOURLWriteDataAndPropertiesToResource(CFURLRef url, CFDataRef dataToWrite, CFDictionaryRef propertiesToWrite, int32_t *errorCode); 33 | 34 | #ifdef HAVE_CFURLACCESS 35 | 36 | #define kIOURLFileExists kCFURLFileExists 37 | #define kIOURLFileDirectoryContents kCFURLFileDirectoryContents 38 | #define kIOURLFileLength kCFURLFileLength 39 | #define kIOURLFileLastModificationTime kCFURLFileLastModificationTime 40 | #define kIOURLFilePOSIXMode kCFURLFilePOSIXMode 41 | #define kIOURLFileOwnerID kCFURLFileOwnerID 42 | 43 | /* Common error codes; this list is expected to grow */ 44 | 45 | typedef CFURLError IOURLError; 46 | 47 | enum { 48 | kIOURLUnknownError = kCFURLUnknownError, 49 | kIOURLUnknownSchemeError = kCFURLUnknownSchemeError, 50 | kIOURLResourceNotFoundError = kCFURLResourceNotFoundError, 51 | kIOURLResourceAccessViolationError = kCFURLResourceAccessViolationError, 52 | kIOURLRemoteHostUnavailableError = kCFURLRemoteHostUnavailableError, 53 | kIOURLImproperArgumentsError = kCFURLImproperArgumentsError, 54 | kIOURLUnknownPropertyKeyError = kCFURLUnknownPropertyKeyError, 55 | kIOURLPropertyKeyUnavailableError = kCFURLPropertyKeyUnavailableError, 56 | kIOURLTimeoutError = kCFURLTimeoutError 57 | }; 58 | 59 | #else /* !HAVE_CFURLACCESS */ 60 | 61 | #define kIOURLFileExists CFSTR("kIOURLFileExists") 62 | #define kIOURLFileDirectoryContents CFSTR("kIOURLFileDirectoryContents") 63 | #define kIOURLFileLength CFSTR("kIOURLFileLength") 64 | #define kIOURLFileLastModificationTime CFSTR("kIOURLFileLastModificationTime") 65 | #define kIOURLFilePOSIXMode CFSTR("kIOURLFilePOSIXMode") 66 | #define kIOURLFileOwnerID CFSTR("kIOURLFileOwnerID") 67 | 68 | /* Common error codes; this list is expected to grow */ 69 | 70 | typedef enum { 71 | kIOURLUnknownError = -10, 72 | kIOURLUnknownSchemeError = -11, 73 | kIOURLResourceNotFoundError = -12, 74 | kIOURLResourceAccessViolationError = -13, 75 | kIOURLRemoteHostUnavailableError = -14, 76 | kIOURLImproperArgumentsError = -15, 77 | kIOURLUnknownPropertyKeyError = -16, 78 | kIOURLPropertyKeyUnavailableError = -17, 79 | kIOURLTimeoutError = -18 80 | } IOURLError; 81 | 82 | #endif /* !HAVE_CFURLACCESS */ 83 | 84 | #endif /* __IOKIT_IOCFURLACCESS_H */ 85 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOCFUnserialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* IOUnserialize.h created by rsulack on Mon 23-Nov-1998 */ 24 | /* IOCFUnserialize.h creates CF collections Mon 30-Aug-1999 */ 25 | 26 | #ifndef __IOKIT_IOCFUNSERIALIZE_H 27 | #define __IOKIT_IOCFUNSERIALIZE_H 28 | 29 | #include 30 | #include 31 | 32 | #if defined(__cplusplus) 33 | extern "C" { 34 | #endif 35 | 36 | // on success IOCFUnserialize sets errorString to 0 and returns 37 | // the unserialized object. 38 | 39 | // on failure IOCFUnserialize sets errorString to a CFString object 40 | // containing a error message suitable for logging and returns 0 41 | 42 | CFTypeRef 43 | IOCFUnserialize(const char *buffer, 44 | CFAllocatorRef allocator, 45 | CFOptionFlags options, 46 | CFStringRef *errorString); 47 | 48 | #if defined(__cplusplus) 49 | } 50 | #endif 51 | 52 | #endif /* __IOKIT_IOCFUNSERIALIZE_H */ 53 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IODataQueueClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOKITUSER_IODATAQUEUE_H 25 | #define _IOKITUSER_IODATAQUEUE_H 26 | 27 | #include 28 | 29 | __BEGIN_DECLS 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | /*! 37 | * @function IODataQueueDataAvailable 38 | * @abstract Used to determine if more data is avilable on the queue. 39 | * @param dataQueue The IODataQueueMemory region mapped from the kenel. 40 | * @result Returns true if data is available and false if not. 41 | */ 42 | Boolean IODataQueueDataAvailable(IODataQueueMemory *dataQueue); 43 | 44 | /*! 45 | * @function IODataQueuePeek 46 | * @abstract Used to peek at the next entry on the queue. 47 | * @discussion This function can be used to look at the next entry which allows the entry to be received without having to copy it with IODataQueueDequeue. In order to do this, call IODataQueuePeek to get the entry. Then call IODataQueueDequeue with a NULL data pointer. That will cause the head to be moved to the next entry, but no memory to be copied. 48 | * @param dataQueue The IODataQueueMemory region mapped from the kernel. 49 | * @result Returns a pointer to the next IODataQueueEntry if one is available. Zero is returned if the queue is empty. 50 | */ 51 | IODataQueueEntry *IODataQueuePeek(IODataQueueMemory *dataQueue); 52 | 53 | /*! 54 | * @function IODataQueueDequeue 55 | * @abstract Dequeues the next available entry on the queue and copies it into the given data pointer. 56 | * @discussion This function will dequeue the next available entry on the queue. If a data pointer is provided, it will copy the data into the memory region if there is enough space available as specified in the dataSize parameter. If no data pointer is provided, it will simply move the head value past the current entry. 57 | * @param dataQueue The IODataQueueMemory region mapped from the kernel. 58 | * @param data A pointer to the data memory region in which to copy the next entry data on the queue. If this parameter is 0 (NULL), it will simply move to the next entry. 59 | * @param dataSize A pointer to the size of the data parameter. On return, this contains the size of the actual entry data - even if the original size was not large enough. 60 | * @result Returns kIOReturnSuccess on success. Other return values possible are: kIOReturnUnderrun - queue is empty, kIOReturnBadArgument - no dataQueue or no dataSize, kIOReturnNoSpace - dataSize is too small for entry. 61 | */ 62 | IOReturn IODataQueueDequeue(IODataQueueMemory *dataQueue, void *data, uint32_t *dataSize); 63 | 64 | /*! 65 | * @function IODataQueueWaitForAvailableData 66 | * @abstract Wait for an incoming dataAvailable message on the given notifyPort. 67 | * @discussion This method will simply wait for an incoming message on the given notifyPort. Once it is received, the return from mach_msg() is returned. 68 | * @param dataQueue The IODataQueueMemory region mapped from the kernel. 69 | * @param notifyPort Mach port on which to listen for incoming messages. 70 | * @result Returns kIOReturnSuccess on success. Returns kIOReturnBadArgument if either dataQueue is 0 (NULL) or notiryPort is MACH_PORT_NULL. Returns the result of the mach_msg() listen call on the given port. 71 | */ 72 | IOReturn IODataQueueWaitForAvailableData(IODataQueueMemory *dataQueue, mach_port_t notificationPort); 73 | 74 | /*! 75 | * @function IODataQueueAllocateNotificationPort 76 | * @abstract Allocates and returns a new mach port able to receive data available notifications from an IODataQueue. 77 | * @discussion This port is intended to be passed down into the kernel and into an IODataQueue to allow it to send the appropriate notification. The returned mach port is allocated with a queue limit of one message. This allows only one mach message to be queued up at a time. The IODataQueue code is written with the restriction in mind and will only queue up a message if no messages alread have been sent. 78 | * @result Returns a newly allocated mach port on success. On failure, it returns MACH_PORT_NULL. 79 | */ 80 | mach_port_t IODataQueueAllocateNotificationPort(); 81 | 82 | /*! 83 | * @function IODataQueueEnqueue 84 | * @abstract Enqueues a new entry on the queue. 85 | * @discussion This method adds a new data entry of dataSize to the queue. It sets the size parameter of the entry pointed to by the tail value and copies the memory pointed to by the data parameter in place in the queue. Once that is done, it moves the tail to the next available location. When attempting to add a new entry towards the end of the queue and there isn't enough space at the end, it wraps back to the beginning.
If the queue is empty when a new entry is added, the port specified in IODataQueueSetNotificationPort will be used to send a message to the client process that data is now available.
Please note that using this method without mapped memory create from an IOSharedDataQueue will result in undefined behavior. 86 | * @param dataQueue The IODataQueueMemory region mapped from the kernel created from an IOSharedDataQueue. 87 | * @param data Pointer to the data to be added to the queue. 88 | * @param dataSize Size of the data pointed to by data. 89 | * @result Returns kIOReturnSuccess on success. Other return values possible are: kIOReturnOverrun - queue is full. 90 | */ 91 | IOReturn IODataQueueEnqueue(IODataQueueMemory *dataQueue, void *data, uint32_t dataSize) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; 92 | 93 | /*! 94 | * @function IODataQueueSetNotificationPort 95 | * @abstract Creates a simple mach message targeting the mach port specified in port. 96 | * @discussion This message is sent when data is added to an empty queue. It is to notify another user process that new data has become available. Please note that using this method without mapped memory create from an IOSharedDataQueue will result in undefined behavior. 97 | * @param dataQueue The IODataQueueMemory region mapped from the kernel created from an IOSharedDataQueue. 98 | * @param notifyPort The mach port to target with the notification message. 99 | * @result Returns kIOReturnSuccess on success. Returns kIOReturnBadArgument if either dataQueue is 0 (NULL). 100 | */ 101 | IOReturn IODataQueueSetNotificationPort(IODataQueueMemory *dataQueue, mach_port_t notifyPort) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; 102 | 103 | __END_DECLS 104 | 105 | #endif /* _IOKITUSER_IODATAQUEUE_H */ 106 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IODataQueueShared.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #ifndef _IOKIT_IODATAQUEUESHARED_H 30 | #define _IOKIT_IODATAQUEUESHARED_H 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | /*! 37 | * @typedef IODataQueueEntry 38 | * @abstract Represents an entry within the data queue 39 | * @discussion This is a variable sized struct. The data field simply represents the start of the data region. The size of the data region is stored in the size field. The whole size of the specific entry is the size of a UInt32 plus the size of the data region. 40 | * @field size The size of the following data region. 41 | * @field data Represents the beginning of the data region. The address of the data field is a pointer to the start of the data region. 42 | */ 43 | typedef struct _IODataQueueEntry{ 44 | UInt32 size; 45 | UInt8 data[4]; 46 | } IODataQueueEntry; 47 | 48 | /*! 49 | * @typedef IODataQueueMemory 50 | * @abstract A struct mapping to the header region of a data queue. 51 | * @discussion This struct is variable sized. The struct represents the data queue header information plus a pointer to the actual data queue itself. The size of the struct is the combined size of the header fields (3 * sizeof(UInt32)) plus the actual size of the queue region. This size is stored in the queueSize field. 52 | * @field queueSize The size of the queue region pointed to by the queue field. 53 | * @field head The location of the queue head. This field is represented as a byte offset from the beginning of the queue memory region. 54 | * @field tail The location of the queue tail. This field is represented as a byte offset from the beginning of the queue memory region. 55 | * @field queue Represents the beginning of the queue memory region. The size of the region pointed to by queue is stored in the queueSize field. 56 | */ 57 | typedef struct _IODataQueueMemory { 58 | UInt32 queueSize; 59 | volatile UInt32 head; 60 | volatile UInt32 tail; 61 | IODataQueueEntry queue[1]; 62 | } IODataQueueMemory; 63 | 64 | /*! 65 | * @typedef IODataQueueAppendix 66 | * @abstract A struct mapping to the appendix region of a data queue. 67 | * @discussion This struct is variable sized dependent on the version. The struct represents the data queue appendix information. 68 | * @field version The version of the queue appendix. 69 | * @field port The notification port associated with this queue. 70 | */ 71 | typedef struct _IODataQueueAppendix { 72 | UInt32 version; 73 | mach_msg_header_t msgh; 74 | } IODataQueueAppendix; 75 | 76 | /*! 77 | * @defined DATA_QUEUE_ENTRY_HEADER_SIZE Represents the size of the data queue entry header independent of the actual size of the data in the entry. This is the overhead of each entry in the queue. The total size of an entry is equal to this value plus the size stored in the entry's size field (in IODataQueueEntry). 78 | */ 79 | #define DATA_QUEUE_ENTRY_HEADER_SIZE (sizeof(IODataQueueEntry) - 4) 80 | 81 | /*! 82 | * @defined DATA_QUEUE_MEMORY_HEADER_SIZE Represents the size of the data queue memory header independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of the queue appendix and the size of the queue data region which is stored in the queueSize field of IODataQueueMeory. 83 | */ 84 | #define DATA_QUEUE_MEMORY_HEADER_SIZE (sizeof(IODataQueueMemory) - sizeof(IODataQueueEntry)) 85 | 86 | /*! 87 | * @defined DATA_QUEUE_MEMORY_APPENDIX_SIZE Represents the size of the data queue memory appendix independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of queue header and size of the queue data region which is stored in the queueSize field of IODataQueueMeory. 88 | */ 89 | #define DATA_QUEUE_MEMORY_APPENDIX_SIZE (sizeof(IODataQueueAppendix)) 90 | 91 | #endif /* _IOKIT_IODATAQUEUESHARED_H */ 92 | 93 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOKitKeys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 30 | * 31 | * Common symbol definitions for IOKit. 32 | * 33 | * HISTORY 34 | * 35 | */ 36 | 37 | 38 | #ifndef _IOKIT_IOKITKEYS_H 39 | #define _IOKIT_IOKITKEYS_H 40 | 41 | // properties found in the registry root 42 | #define kIOKitBuildVersionKey "IOKitBuildVersion" 43 | #define kIOKitDiagnosticsKey "IOKitDiagnostics" 44 | // a dictionary keyed by plane name 45 | #define kIORegistryPlanesKey "IORegistryPlanes" 46 | #define kIOCatalogueKey "IOCatalogue" 47 | 48 | // registry plane names 49 | #define kIOServicePlane "IOService" 50 | #define kIOPowerPlane "IOPower" 51 | #define kIODeviceTreePlane "IODeviceTree" 52 | #define kIOAudioPlane "IOAudio" 53 | #define kIOFireWirePlane "IOFireWire" 54 | #define kIOUSBPlane "IOUSB" 55 | 56 | // registry ID number 57 | #define kIORegistryEntryIDKey "IORegistryEntryID" 58 | 59 | // IOService class name 60 | #define kIOServiceClass "IOService" 61 | 62 | // IOResources class name 63 | #define kIOResourcesClass "IOResources" 64 | 65 | // IOService driver probing property names 66 | #define kIOClassKey "IOClass" 67 | #define kIOProbeScoreKey "IOProbeScore" 68 | #define kIOKitDebugKey "IOKitDebug" 69 | 70 | // IOService matching property names 71 | #define kIOProviderClassKey "IOProviderClass" 72 | #define kIONameMatchKey "IONameMatch" 73 | #define kIOPropertyMatchKey "IOPropertyMatch" 74 | #define kIOPathMatchKey "IOPathMatch" 75 | #define kIOLocationMatchKey "IOLocationMatch" 76 | #define kIOParentMatchKey "IOParentMatch" 77 | #define kIOResourceMatchKey "IOResourceMatch" 78 | #define kIOMatchedServiceCountKey "IOMatchedServiceCountMatch" 79 | 80 | #define kIONameMatchedKey "IONameMatched" 81 | 82 | #define kIOMatchCategoryKey "IOMatchCategory" 83 | #define kIODefaultMatchCategoryKey "IODefaultMatchCategory" 84 | 85 | // IOService default user client class, for loadable user clients 86 | #define kIOUserClientClassKey "IOUserClientClass" 87 | 88 | // key to find IOMappers 89 | #define kIOMapperIDKey "IOMapperID" 90 | 91 | #define kIOUserClientCrossEndianKey "IOUserClientCrossEndian" 92 | #define kIOUserClientCrossEndianCompatibleKey "IOUserClientCrossEndianCompatible" 93 | #define kIOUserClientSharedInstanceKey "IOUserClientSharedInstance" 94 | // diagnostic string describing the creating task 95 | #define kIOUserClientCreatorKey "IOUserClientCreator" 96 | 97 | // IOService notification types 98 | #define kIOPublishNotification "IOServicePublish" 99 | #define kIOFirstPublishNotification "IOServiceFirstPublish" 100 | #define kIOMatchedNotification "IOServiceMatched" 101 | #define kIOFirstMatchNotification "IOServiceFirstMatch" 102 | #define kIOTerminatedNotification "IOServiceTerminate" 103 | 104 | // IOService interest notification types 105 | #define kIOGeneralInterest "IOGeneralInterest" 106 | #define kIOBusyInterest "IOBusyInterest" 107 | #define kIOAppPowerStateInterest "IOAppPowerStateInterest" 108 | #define kIOPriorityPowerStateInterest "IOPriorityPowerStateInterest" 109 | 110 | #define kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage" 111 | 112 | // IOService interest notification types 113 | #define kIOCFPlugInTypesKey "IOCFPlugInTypes" 114 | 115 | // properties found in services that implement command pooling 116 | #define kIOCommandPoolSizeKey "IOCommandPoolSize" // (OSNumber) 117 | 118 | // properties found in services that have transfer constraints 119 | #define kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead" // (OSNumber) 120 | #define kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite" // (OSNumber) 121 | #define kIOMaximumByteCountReadKey "IOMaximumByteCountRead" // (OSNumber) 122 | #define kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite" // (OSNumber) 123 | #define kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead" // (OSNumber) 124 | #define kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite" // (OSNumber) 125 | #define kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead" // (OSNumber) 126 | #define kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite" // (OSNumber) 127 | #define kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount" // (OSNumber) 128 | #define kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" // (OSNumber) 129 | 130 | // properties found in services that wish to describe an icon 131 | // 132 | // IOIcon = 133 | // { 134 | // CFBundleIdentifier = "com.example.driver.example"; 135 | // IOBundleResourceFile = "example.icns"; 136 | // }; 137 | // 138 | // where IOBundleResourceFile is the filename of the resource 139 | 140 | #define kIOIconKey "IOIcon" // (OSDictionary) 141 | #define kIOBundleResourceFileKey "IOBundleResourceFile" // (OSString) 142 | 143 | #define kIOBusBadgeKey "IOBusBadge" // (OSDictionary) 144 | #define kIODeviceIconKey "IODeviceIcon" // (OSDictionary) 145 | 146 | // property of root that describes the machine's serial number as a string 147 | #define kIOPlatformSerialNumberKey "IOPlatformSerialNumber" // (OSString) 148 | 149 | // property of root that describes the machine's UUID as a string 150 | #define kIOPlatformUUIDKey "IOPlatformUUID" // (OSString) 151 | 152 | // IODTNVRAM property keys 153 | #define kIONVRAMDeletePropertyKey "IONVRAM-DELETE-PROPERTY" 154 | #define kIODTNVRAMPanicInfoKey "aapl,panic-info" 155 | 156 | // keys for complex boot information 157 | #define kIOBootDeviceKey "IOBootDevice" // dict | array of dicts 158 | #define kIOBootDevicePathKey "IOBootDevicePath" // arch-neutral OSString 159 | #define kIOBootDeviceSizeKey "IOBootDeviceSize" // OSNumber of bytes 160 | 161 | // keys for OS Version information 162 | #define kOSBuildVersionKey "OS Build Version" 163 | 164 | #endif /* ! _IOKIT_IOKITKEYS_H */ 165 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOKitServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. 30 | * 31 | * HISTORY 32 | * 33 | */ 34 | 35 | /* 36 | * Internal definitions used between the iokit user library and 37 | * server routines. 38 | */ 39 | 40 | #ifndef _IOKIT_IOKITSERVER_H 41 | #define _IOKIT_IOKITSERVER_H 42 | 43 | #include 44 | #include 45 | #include 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | #include 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | // IOMakeMatching 56 | /*! 57 | @enum IOMakeMatching 58 | @constant kIOServiceMatching 59 | @constant kIOBSDNameMatching 60 | @constant kIOOFPathMatching 61 | */ 62 | enum { 63 | kIOServiceMatching = 100, 64 | kIOBSDNameMatching = 101, 65 | kIOOFPathMatching = 102 66 | }; 67 | 68 | // IOCatalogueSendData 69 | /*! 70 | @enum IOCatalogueSendData user-client flags. 71 | @constant kIOCatalogAddDrivers Signals a call to the addDrivers function in IOCatalogue. 72 | @constant kIOCatalogAddDriversNoMatch Signals a call to the addDrivers function in IOCatalogue but does not start a matching thread. 73 | @constant kIOCatalogRemoveDrivers Signals a call to the removeDrivers function in IOCatalogue. 74 | @constant kIOCatalogRemoveDriversNoMatch Signals a call to the removedrivers function in IOCatalogue but does not start a matching thread. 75 | @constant kIOCatalogStartMatching Signals the IOCatalogue to start an IOService matching thread. 76 | */ 77 | enum { 78 | kIOCatalogAddDrivers = 1, 79 | kIOCatalogAddDriversNoMatch, 80 | kIOCatalogRemoveDrivers, 81 | kIOCatalogRemoveDriversNoMatch, 82 | kIOCatalogStartMatching, 83 | kIOCatalogRemoveKernelLinker, 84 | kIOCatalogKextdActive, 85 | kIOCatalogKextdFinishedLaunching 86 | }; 87 | 88 | // IOCatalogueGetData 89 | /*! 90 | @enum IOCatalogueGetData user-client flags 91 | @constant kIOCatalogGetContents Returns a snapshot of the database to the caller. 92 | */ 93 | enum { 94 | kIOCatalogGetContents = 1, 95 | kIOCatalogGetModuleDemandList = 2, 96 | kIOCatalogGetCacheMissList = 3, 97 | kIOCatalogGetROMMkextList = 4 98 | }; 99 | 100 | // IOCatalogueReset 101 | /*! 102 | @enum IOCatalogueReset user-client flag 103 | @constant kIOCatalogResetDefault Removes all entries from IOCatalogue except those used for booting the system. 104 | */ 105 | enum { 106 | kIOCatalogResetDefault = 1 107 | }; 108 | 109 | // IOCatalogueTerminate 110 | /*! 111 | @enum IOCatalogueTerminate user-client flags. 112 | @constant kIOCatalogModuleUnload Terminates all services which depend on a particular module and unloads the module. 113 | @constant kIOCatalogModuleTerminate Terminates all services which depend on a particular module but does not unload the module. 114 | @constant kIOCatalogServiceTerminate Terminates a particular service by name. 115 | */ 116 | enum { 117 | kIOCatalogModuleUnload = 1, 118 | kIOCatalogModuleTerminate, 119 | kIOCatalogServiceTerminate 120 | }; 121 | 122 | #endif /* ! _IOKIT_IOKITSERVER_H */ 123 | 124 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #ifndef __IOKIT_IOMESSAGE_H 30 | #define __IOKIT_IOMESSAGE_H 31 | 32 | #include 33 | #include 34 | 35 | typedef UInt32 IOMessage; 36 | 37 | #define iokit_common_msg(message) (UInt32)(sys_iokit|sub_iokit_common|message) 38 | #define iokit_family_msg(sub,message) (UInt32)(sys_iokit|sub|message) 39 | 40 | /*! @defined iokit_vendor_specific_msg 41 | @discussion iokit_vendor_specific_msg passes messages in the sub_iokit_vendor_specific 42 | subsystem. It can be used to be generate messages that are used for private 43 | communication between vendor specific code with the IOService::message() etc. APIs. 44 | */ 45 | #define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message) 46 | 47 | #define kIOMessageServiceIsTerminated iokit_common_msg(0x010) 48 | #define kIOMessageServiceIsSuspended iokit_common_msg(0x020) 49 | #define kIOMessageServiceIsResumed iokit_common_msg(0x030) 50 | 51 | #define kIOMessageServiceIsRequestingClose iokit_common_msg(0x100) 52 | #define kIOMessageServiceIsAttemptingOpen iokit_common_msg(0x101) 53 | #define kIOMessageServiceWasClosed iokit_common_msg(0x110) 54 | 55 | #define kIOMessageServiceBusyStateChange iokit_common_msg(0x120) 56 | 57 | #define kIOMessageServicePropertyChange iokit_common_msg(0x130) 58 | 59 | #define kIOMessageCanDevicePowerOff iokit_common_msg(0x200) 60 | #define kIOMessageDeviceWillPowerOff iokit_common_msg(0x210) 61 | #define kIOMessageDeviceWillNotPowerOff iokit_common_msg(0x220) 62 | #define kIOMessageDeviceHasPoweredOn iokit_common_msg(0x230) 63 | #define kIOMessageCanSystemPowerOff iokit_common_msg(0x240) 64 | #define kIOMessageSystemWillPowerOff iokit_common_msg(0x250) 65 | #define kIOMessageSystemWillNotPowerOff iokit_common_msg(0x260) 66 | #define kIOMessageCanSystemSleep iokit_common_msg(0x270) 67 | #define kIOMessageSystemWillSleep iokit_common_msg(0x280) 68 | #define kIOMessageSystemWillNotSleep iokit_common_msg(0x290) 69 | #define kIOMessageSystemHasPoweredOn iokit_common_msg(0x300) 70 | #define kIOMessageSystemWillRestart iokit_common_msg(0x310) 71 | #define kIOMessageSystemWillPowerOn iokit_common_msg(0x320) 72 | 73 | #define kIOMessageCopyClientID iokit_common_msg(0x330) 74 | 75 | #endif /* ! __IOKIT_IOMESSAGE_H */ 76 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOReturn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * HISTORY 30 | */ 31 | 32 | /* 33 | * Core IOReturn values. Others may be family defined. 34 | */ 35 | 36 | #ifndef __IOKIT_IORETURN_H 37 | #define __IOKIT_IORETURN_H 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | #include 44 | 45 | typedef kern_return_t IOReturn; 46 | 47 | #ifndef sys_iokit 48 | #define sys_iokit err_system(0x38) 49 | #endif /* sys_iokit */ 50 | #define sub_iokit_common err_sub(0) 51 | #define sub_iokit_usb err_sub(1) 52 | #define sub_iokit_firewire err_sub(2) 53 | #define sub_iokit_block_storage err_sub(4) 54 | #define sub_iokit_graphics err_sub(5) 55 | #define sub_iokit_networking err_sub(6) 56 | #define sub_iokit_bluetooth err_sub(8) 57 | #define sub_iokit_pmu err_sub(9) 58 | #define sub_iokit_acpi err_sub(10) 59 | #define sub_iokit_smbus err_sub(11) 60 | #define sub_iokit_ahci err_sub(12) 61 | #define sub_iokit_powermanagement err_sub(13) 62 | //#define sub_iokit_hidsystem err_sub(14) 63 | //#define sub_iokit_pccard err_sub(21) 64 | 65 | #define sub_iokit_vendor_specific err_sub(-2) 66 | #define sub_iokit_reserved err_sub(-1) 67 | 68 | #define iokit_common_err(return) (sys_iokit|sub_iokit_common|return) 69 | #define iokit_family_err(sub,return) (sys_iokit|sub|return) 70 | #define iokit_vendor_specific_err(return) (sys_iokit|sub_iokit_vendor_specific|return) 71 | 72 | #define kIOReturnSuccess KERN_SUCCESS // OK 73 | #define kIOReturnError iokit_common_err(0x2bc) // general error 74 | #define kIOReturnNoMemory iokit_common_err(0x2bd) // can't allocate memory 75 | #define kIOReturnNoResources iokit_common_err(0x2be) // resource shortage 76 | #define kIOReturnIPCError iokit_common_err(0x2bf) // error during IPC 77 | #define kIOReturnNoDevice iokit_common_err(0x2c0) // no such device 78 | #define kIOReturnNotPrivileged iokit_common_err(0x2c1) // privilege violation 79 | #define kIOReturnBadArgument iokit_common_err(0x2c2) // invalid argument 80 | #define kIOReturnLockedRead iokit_common_err(0x2c3) // device read locked 81 | #define kIOReturnLockedWrite iokit_common_err(0x2c4) // device write locked 82 | #define kIOReturnExclusiveAccess iokit_common_err(0x2c5) // exclusive access and 83 | // device already open 84 | #define kIOReturnBadMessageID iokit_common_err(0x2c6) // sent/received messages 85 | // had different msg_id 86 | #define kIOReturnUnsupported iokit_common_err(0x2c7) // unsupported function 87 | #define kIOReturnVMError iokit_common_err(0x2c8) // misc. VM failure 88 | #define kIOReturnInternalError iokit_common_err(0x2c9) // internal error 89 | #define kIOReturnIOError iokit_common_err(0x2ca) // General I/O error 90 | //#define kIOReturn???Error iokit_common_err(0x2cb) // ??? 91 | #define kIOReturnCannotLock iokit_common_err(0x2cc) // can't acquire lock 92 | #define kIOReturnNotOpen iokit_common_err(0x2cd) // device not open 93 | #define kIOReturnNotReadable iokit_common_err(0x2ce) // read not supported 94 | #define kIOReturnNotWritable iokit_common_err(0x2cf) // write not supported 95 | #define kIOReturnNotAligned iokit_common_err(0x2d0) // alignment error 96 | #define kIOReturnBadMedia iokit_common_err(0x2d1) // Media Error 97 | #define kIOReturnStillOpen iokit_common_err(0x2d2) // device(s) still open 98 | #define kIOReturnRLDError iokit_common_err(0x2d3) // rld failure 99 | #define kIOReturnDMAError iokit_common_err(0x2d4) // DMA failure 100 | #define kIOReturnBusy iokit_common_err(0x2d5) // Device Busy 101 | #define kIOReturnTimeout iokit_common_err(0x2d6) // I/O Timeout 102 | #define kIOReturnOffline iokit_common_err(0x2d7) // device offline 103 | #define kIOReturnNotReady iokit_common_err(0x2d8) // not ready 104 | #define kIOReturnNotAttached iokit_common_err(0x2d9) // device not attached 105 | #define kIOReturnNoChannels iokit_common_err(0x2da) // no DMA channels left 106 | #define kIOReturnNoSpace iokit_common_err(0x2db) // no space for data 107 | //#define kIOReturn???Error iokit_common_err(0x2dc) // ??? 108 | #define kIOReturnPortExists iokit_common_err(0x2dd) // port already exists 109 | #define kIOReturnCannotWire iokit_common_err(0x2de) // can't wire down 110 | // physical memory 111 | #define kIOReturnNoInterrupt iokit_common_err(0x2df) // no interrupt attached 112 | #define kIOReturnNoFrames iokit_common_err(0x2e0) // no DMA frames enqueued 113 | #define kIOReturnMessageTooLarge iokit_common_err(0x2e1) // oversized msg received 114 | // on interrupt port 115 | #define kIOReturnNotPermitted iokit_common_err(0x2e2) // not permitted 116 | #define kIOReturnNoPower iokit_common_err(0x2e3) // no power to device 117 | #define kIOReturnNoMedia iokit_common_err(0x2e4) // media not present 118 | #define kIOReturnUnformattedMedia iokit_common_err(0x2e5)// media not formatted 119 | #define kIOReturnUnsupportedMode iokit_common_err(0x2e6) // no such mode 120 | #define kIOReturnUnderrun iokit_common_err(0x2e7) // data underrun 121 | #define kIOReturnOverrun iokit_common_err(0x2e8) // data overrun 122 | #define kIOReturnDeviceError iokit_common_err(0x2e9) // the device is not working properly! 123 | #define kIOReturnNoCompletion iokit_common_err(0x2ea) // a completion routine is required 124 | #define kIOReturnAborted iokit_common_err(0x2eb) // operation aborted 125 | #define kIOReturnNoBandwidth iokit_common_err(0x2ec) // bus bandwidth would be exceeded 126 | #define kIOReturnNotResponding iokit_common_err(0x2ed) // device not responding 127 | #define kIOReturnIsoTooOld iokit_common_err(0x2ee) // isochronous I/O request for distant past! 128 | #define kIOReturnIsoTooNew iokit_common_err(0x2ef) // isochronous I/O request for distant future 129 | #define kIOReturnNotFound iokit_common_err(0x2f0) // data was not found 130 | #define kIOReturnInvalid iokit_common_err(0x1) // should never be seen 131 | 132 | #ifdef __cplusplus 133 | } 134 | #endif 135 | 136 | #endif /* ! __IOKIT_IORETURN_H */ 137 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOSharedLock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. 30 | * 31 | * HISTORY 32 | * 33 | */ 34 | 35 | /* 36 | * Multiprocessor locks used within the shared memory area between the 37 | * kernel and event system. These must work in both user and kernel mode. 38 | * 39 | * These routines are public, for the purpose of writing frame buffer device 40 | * drivers which handle their own cursors. Certain architectures define a 41 | * generic display class which handles cursor drawing and is subclassed by 42 | * driver writers. These drivers need not be concerned with the following 43 | * types and definitions. 44 | * 45 | * The ev_lock(), ev_unlock(), and ev_try_lock() functions are available only 46 | * to drivers built in or dynamically loaded into the kernel, and to DPS 47 | * drivers built in or dynamically loaded into the Window Server. They do not 48 | * exist in any shared library. 49 | * 50 | * --> They're now in IOKit user lib. 51 | */ 52 | 53 | #ifndef _IOKIT_IOSHAREDLOCK_H 54 | #define _IOKIT_IOSHAREDLOCK_H 55 | 56 | #ifdef __cplusplus 57 | extern "C" { 58 | #endif 59 | 60 | // should be 32 bytes on PPC 61 | typedef volatile int IOSharedLockData; 62 | typedef IOSharedLockData * IOSharedLock; 63 | 64 | #define IOSpinLockInit(l) (*(l) = (IOSharedLockData)0) 65 | 66 | extern void IOSpinLock(IOSharedLock l); 67 | 68 | extern void IOSpinUnlock(IOSharedLock l); 69 | extern boolean_t IOTrySpinLock(IOSharedLock l); 70 | 71 | /* exact same stuff & implementation */ 72 | 73 | typedef IOSharedLockData ev_lock_data_t; 74 | typedef ev_lock_data_t * ev_lock_t; 75 | 76 | #define ev_init_lock(l) (*(l) = (ev_lock_data_t)0) 77 | // needs isync? 78 | //#define ev_is_locked(l) (*(l) != (ev_lock_data_t)0) 79 | 80 | extern void ev_lock(ev_lock_t l); // Spin lock! 81 | 82 | extern void ev_unlock(ev_lock_t l); 83 | extern boolean_t ev_try_lock(ev_lock_t l); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif /* ! _IOKIT_IOSHAREDLOCK_H */ 89 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/IOTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | #ifndef __IOKIT_IOTYPES_H 29 | #define __IOKIT_IOTYPES_H 30 | 31 | #ifndef IOKIT 32 | #define IOKIT 1 33 | #endif /* !IOKIT */ 34 | 35 | #include 36 | #include 37 | 38 | #include 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #ifndef NULL 45 | #if defined (__cplusplus) 46 | #define NULL 0 47 | #else 48 | #define NULL ((void *)0) 49 | #endif 50 | #endif 51 | 52 | /* 53 | * Simple data types. 54 | */ 55 | #ifndef __MACTYPES__ /* CF MacTypes.h */ 56 | #ifndef __TYPES__ /* guess... Mac Types.h */ 57 | 58 | #include 59 | #include 60 | 61 | #endif /* __TYPES__ */ 62 | #endif /* __MACTYPES__ */ 63 | 64 | 65 | typedef UInt32 IOOptionBits; 66 | typedef SInt32 IOFixed; 67 | typedef UInt32 IOVersion; 68 | typedef UInt32 IOItemCount; 69 | typedef UInt32 IOCacheMode; 70 | 71 | typedef UInt32 IOByteCount32; 72 | typedef UInt64 IOByteCount64; 73 | 74 | typedef UInt32 IOPhysicalAddress32; 75 | typedef UInt64 IOPhysicalAddress64; 76 | typedef UInt32 IOPhysicalLength32; 77 | typedef UInt64 IOPhysicalLength64; 78 | 79 | #ifdef __LP64__ 80 | typedef mach_vm_address_t IOVirtualAddress; 81 | #else 82 | typedef vm_address_t IOVirtualAddress; 83 | #endif 84 | 85 | #if defined(__LP64__) && defined(KERNEL) 86 | typedef IOByteCount64 IOByteCount; 87 | #else 88 | typedef IOByteCount32 IOByteCount; 89 | #endif 90 | 91 | typedef IOVirtualAddress IOLogicalAddress; 92 | 93 | #if defined(__LP64__) && defined(KERNEL) 94 | 95 | typedef IOPhysicalAddress64 IOPhysicalAddress; 96 | typedef IOPhysicalLength64 IOPhysicalLength; 97 | #define IOPhysical32( hi, lo ) ((UInt64) lo + ((UInt64)(hi) << 32)) 98 | #define IOPhysSize 64 99 | 100 | #else 101 | 102 | typedef IOPhysicalAddress32 IOPhysicalAddress; 103 | typedef IOPhysicalLength32 IOPhysicalLength; 104 | #define IOPhysical32( hi, lo ) (lo) 105 | #define IOPhysSize 32 106 | 107 | #endif 108 | 109 | 110 | typedef struct 111 | { 112 | IOPhysicalAddress address; 113 | IOByteCount length; 114 | } IOPhysicalRange; 115 | 116 | typedef struct 117 | { 118 | IOVirtualAddress address; 119 | IOByteCount length; 120 | } IOVirtualRange; 121 | 122 | #ifdef __LP64__ 123 | typedef IOVirtualRange IOAddressRange; 124 | #else /* !__LP64__ */ 125 | typedef struct 126 | { 127 | mach_vm_address_t address; 128 | mach_vm_size_t length; 129 | } IOAddressRange; 130 | #endif /* !__LP64__ */ 131 | 132 | /* 133 | * Map between #defined or enum'd constants and text description. 134 | */ 135 | typedef struct { 136 | int value; 137 | const char *name; 138 | } IONamedValue; 139 | 140 | 141 | /* 142 | * Memory alignment -- specified as a power of two. 143 | */ 144 | typedef unsigned int IOAlignment; 145 | 146 | #define IO_NULL_VM_TASK ((vm_task_t)0) 147 | 148 | 149 | /* 150 | * Pull in machine specific stuff. 151 | */ 152 | 153 | //#include 154 | 155 | #ifndef MACH_KERNEL 156 | 157 | #ifndef __IOKIT_PORTS_DEFINED__ 158 | #define __IOKIT_PORTS_DEFINED__ 159 | typedef mach_port_t io_object_t; 160 | #endif /* __IOKIT_PORTS_DEFINED__ */ 161 | 162 | #include 163 | 164 | typedef io_object_t io_connect_t; 165 | typedef io_object_t io_enumerator_t; 166 | typedef io_object_t io_iterator_t; 167 | typedef io_object_t io_registry_entry_t; 168 | typedef io_object_t io_service_t; 169 | 170 | #define IO_OBJECT_NULL ((io_object_t) 0) 171 | 172 | #endif /* MACH_KERNEL */ 173 | 174 | // IOConnectMapMemory memoryTypes 175 | enum { 176 | kIODefaultMemoryType = 0 177 | }; 178 | 179 | enum { 180 | kIODefaultCache = 0, 181 | kIOInhibitCache = 1, 182 | kIOWriteThruCache = 2, 183 | kIOCopybackCache = 3, 184 | kIOWriteCombineCache = 4 185 | }; 186 | 187 | // IOMemory mapping options 188 | enum { 189 | kIOMapAnywhere = 0x00000001, 190 | 191 | kIOMapCacheMask = 0x00000700, 192 | kIOMapCacheShift = 8, 193 | kIOMapDefaultCache = kIODefaultCache << kIOMapCacheShift, 194 | kIOMapInhibitCache = kIOInhibitCache << kIOMapCacheShift, 195 | kIOMapWriteThruCache = kIOWriteThruCache << kIOMapCacheShift, 196 | kIOMapCopybackCache = kIOCopybackCache << kIOMapCacheShift, 197 | kIOMapWriteCombineCache = kIOWriteCombineCache << kIOMapCacheShift, 198 | 199 | kIOMapUserOptionsMask = 0x00000fff, 200 | 201 | kIOMapReadOnly = 0x00001000, 202 | 203 | kIOMapStatic = 0x01000000, 204 | kIOMapReference = 0x02000000, 205 | kIOMapUnique = 0x04000000 206 | }; 207 | 208 | /*! @enum Scale Factors 209 | @discussion Used when a scale_factor parameter is required to define a unit of time. 210 | @constant kNanosecondScale Scale factor for nanosecond based times. 211 | @constant kMicrosecondScale Scale factor for microsecond based times. 212 | @constant kMillisecondScale Scale factor for millisecond based times. 213 | @constant kTickScale Scale factor for the standard (100Hz) tick. 214 | @constant kSecondScale Scale factor for second based times. */ 215 | 216 | enum { 217 | kNanosecondScale = 1, 218 | kMicrosecondScale = 1000, 219 | kMillisecondScale = 1000 * 1000, 220 | kSecondScale = 1000 * 1000 * 1000, 221 | kTickScale = (kSecondScale / 100) 222 | }; 223 | 224 | /* compatibility types */ 225 | 226 | 227 | typedef unsigned int IODeviceNumber; 228 | 229 | 230 | #ifdef __cplusplus 231 | } 232 | #endif 233 | 234 | #endif /* ! __IOKIT_IOTYPES_H */ 235 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOKit/OSMessageNotification.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* 29 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 30 | * 31 | * HISTORY 32 | * 33 | */ 34 | 35 | #ifndef __OS_OSMESSAGENOTIFICATION_H 36 | #define __OS_OSMESSAGENOTIFICATION_H 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | #include 43 | #include 44 | #include 45 | 46 | enum { 47 | kFirstIOKitNotificationType = 100, 48 | kIOServicePublishNotificationType = 100, 49 | kIOServiceMatchedNotificationType = 101, 50 | kIOServiceTerminatedNotificationType = 102, 51 | kIOAsyncCompletionNotificationType = 150, 52 | kIOServiceMessageNotificationType = 160, 53 | kLastIOKitNotificationType = 199 54 | }; 55 | 56 | enum { 57 | kOSNotificationMessageID = 53, 58 | kOSAsyncCompleteMessageID = 57, 59 | kMaxAsyncArgs = 16 60 | }; 61 | 62 | enum { 63 | kIOAsyncReservedIndex = 0, 64 | kIOAsyncReservedCount, 65 | 66 | kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount, 67 | kIOAsyncCalloutRefconIndex, 68 | kIOAsyncCalloutCount, 69 | 70 | kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount, 71 | kIOMatchingCalloutRefconIndex, 72 | kIOMatchingCalloutCount, 73 | 74 | kIOInterestCalloutFuncIndex = kIOAsyncReservedCount, 75 | kIOInterestCalloutRefconIndex, 76 | kIOInterestCalloutServiceIndex, 77 | kIOInterestCalloutCount 78 | }; 79 | 80 | 81 | 82 | // -------------- 83 | enum { 84 | kOSAsyncRef64Count = 8, 85 | kOSAsyncRef64Size = kOSAsyncRef64Count * ((int) sizeof(io_user_reference_t)) 86 | }; 87 | typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count]; 88 | 89 | struct OSNotificationHeader64 { 90 | mach_msg_size_t size; /* content size */ 91 | natural_t type; 92 | OSAsyncReference64 reference; 93 | 94 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 95 | unsigned char content[]; 96 | #else 97 | unsigned char content[0]; 98 | #endif 99 | }; 100 | 101 | #pragma pack(4) 102 | struct IOServiceInterestContent64 { 103 | natural_t messageType; 104 | io_user_reference_t messageArgument[1]; 105 | }; 106 | #pragma pack() 107 | // -------------- 108 | 109 | #if !KERNEL_USER32 110 | 111 | enum { 112 | kOSAsyncRefCount = 8, 113 | kOSAsyncRefSize = 32 114 | }; 115 | typedef natural_t OSAsyncReference[kOSAsyncRefCount]; 116 | 117 | struct OSNotificationHeader { 118 | mach_msg_size_t size; /* content size */ 119 | natural_t type; 120 | OSAsyncReference reference; 121 | 122 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 123 | unsigned char content[]; 124 | #else 125 | unsigned char content[0]; 126 | #endif 127 | }; 128 | 129 | #pragma pack(4) 130 | struct IOServiceInterestContent { 131 | natural_t messageType; 132 | void * messageArgument[1]; 133 | }; 134 | #pragma pack() 135 | 136 | #endif /* KERNEL_USER32 */ 137 | 138 | struct IOAsyncCompletionContent { 139 | IOReturn result; 140 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 141 | void * args[] __attribute__ ((packed)); 142 | #else 143 | void * args[0] __attribute__ ((packed)); 144 | #endif 145 | }; 146 | 147 | #ifndef __cplusplus 148 | typedef struct OSNotificationHeader OSNotificationHeader; 149 | typedef struct IOServiceInterestContent IOServiceInterestContent; 150 | typedef struct IOAsyncCompletionContent IOAsyncCompletionContent; 151 | #endif 152 | 153 | #ifdef __cplusplus 154 | } 155 | #endif 156 | 157 | #endif /* __OS_OSMESSAGENOTIFICATION_H */ 158 | 159 | -------------------------------------------------------------------------------- /RecordMyScreen/headers/IOMobileFrameBuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IOMobileFramebuffer.h 3 | * iPhoneVNCServer 4 | * 5 | * Created by Steven Troughton-Smith on 25/08/2008. 6 | * Copyright 2008 Steven Troughton-Smith. All rights reserved. 7 | * 8 | * Disassembly work by Zodttd 9 | * 10 | */ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include // For mprotect 17 | #include 18 | 19 | #define kIOMobileFramebufferError 0xE0000000 20 | 21 | typedef kern_return_t IOMobileFramebufferReturn; 22 | typedef io_service_t IOMobileFramebufferService; 23 | typedef io_connect_t IOMobileFramebufferConnection; 24 | 25 | /*! @function IOMobileFramebufferOpen 26 | @abstract Basically wraps IOServiceOpen, works the same way as the documented method 27 | @param service The io_service_t you get from IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOMobileFramebuffer")) 28 | @param owningTask Use mach_task_self() 29 | @param type Currently unknown 30 | @param connection A pointer to your new connection 31 | @result A IOMobileFramebufferReturn error code. */ 32 | 33 | IOMobileFramebufferReturn 34 | IOMobileFramebufferOpen( 35 | IOMobileFramebufferService service, 36 | task_port_t owningTask, 37 | unsigned int type, 38 | IOMobileFramebufferConnection * connection ); 39 | 40 | /*! @function IOMobileFramebufferGetLayerDefaultSurface 41 | @abstract Gets the CALayer associated with the display 42 | @param connection Your connection pointer 43 | @param surface Your surface ID 44 | @param layer A pointer to your new layer 45 | @result A IOMobileFramebufferReturn error code. */ 46 | 47 | IOMobileFramebufferReturn 48 | IOMobileFramebufferGetLayerDefaultSurface( 49 | IOMobileFramebufferConnection connection, 50 | int surface, 51 | CoreSurfaceBufferRef *ptr); 52 | 53 | IOMobileFramebufferReturn 54 | IOMobileFramebufferSwapBegin( 55 | IOMobileFramebufferConnection connection, 56 | int *token); 57 | 58 | IOMobileFramebufferReturn 59 | IOMobileFramebufferSwapEnd( 60 | IOMobileFramebufferConnection connection); 61 | 62 | IOMobileFramebufferReturn 63 | IOMobileFramebufferSwapSetLayer( 64 | IOMobileFramebufferConnection connection, 65 | int layerid, 66 | CoreSurfaceBufferRef surface); 67 | 68 | IOMobileFramebufferReturn 69 | IOMobileFramebufferSwapWait( 70 | IOMobileFramebufferConnection connection, 71 | int token, 72 | int something); 73 | 74 | //IOMobileFramebufferReturn 75 | //IOMobileFramebufferGetID( 76 | // IOMobileFramebufferService *connect, 77 | // CFTypeID *id ); 78 | 79 | /* 80 | IOMobileFramebufferGetDisplaySize(io_connect_t connect, CGSize *t); 81 | */ -------------------------------------------------------------------------------- /RecordMyScreen/lens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/lens.png -------------------------------------------------------------------------------- /RecordMyScreen/lens@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/lens@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/list.png -------------------------------------------------------------------------------- /RecordMyScreen/list@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/list@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RecordMyScreen 4 | // 5 | // Created by @coolstarorg on 12/29/12. 6 | // Copyright (c) 2012 CoolStar Organization. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CSAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RecordMyScreen/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/settings.png -------------------------------------------------------------------------------- /RecordMyScreen/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/settings@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/side_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/side_top.png -------------------------------------------------------------------------------- /RecordMyScreen/side_top@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/side_top@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/team.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/team.png -------------------------------------------------------------------------------- /RecordMyScreen/team@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/team@2x.png -------------------------------------------------------------------------------- /RecordMyScreen/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/video.png -------------------------------------------------------------------------------- /RecordMyScreen/video@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/RecordMyScreen/video@2x.png -------------------------------------------------------------------------------- /SAVideoRangeSlider/SAResizibleBubble.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAResizibleBubble.h 3 | // 4 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface SAResizibleBubble : UIView 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SAResizibleBubble.m: -------------------------------------------------------------------------------- 1 | // 2 | // SAResizibleBubble.m 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "SAResizibleBubble.h" 27 | 28 | @implementation SAResizibleBubble 29 | 30 | - (id)initWithFrame:(CGRect)frame 31 | { 32 | self = [super initWithFrame:frame]; 33 | if (self) { 34 | // Initialization code 35 | } 36 | return self; 37 | } 38 | 39 | 40 | 41 | - (void)drawRect:(CGRect)rect 42 | { 43 | //// General Declarations 44 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 45 | CGContextRef context = UIGraphicsGetCurrentContext(); 46 | 47 | //// Color Declarations 48 | UIColor* bubbleGradientTop = [UIColor colorWithRed: 1 green: 0.939 blue: 0.743 alpha: 1]; 49 | UIColor* bubbleGradientBottom = [UIColor colorWithRed: 1 green: 0.817 blue: 0.053 alpha: 1]; 50 | UIColor* bubbleHighlightColor = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; 51 | UIColor* bubbleStrokeColor = [UIColor colorWithRed: 0.173 green: 0.173 blue: 0.173 alpha: 1]; 52 | 53 | //// Gradient Declarations 54 | NSArray* bubbleGradientColors = [NSArray arrayWithObjects: 55 | (id)bubbleGradientTop.CGColor, 56 | (id)bubbleGradientBottom.CGColor, nil]; 57 | CGFloat bubbleGradientLocations[] = {0, 1}; 58 | CGGradientRef bubbleGradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)bubbleGradientColors, bubbleGradientLocations); 59 | 60 | //// Shadow Declarations 61 | UIColor* outerShadow = [UIColor blackColor]; 62 | CGSize outerShadowOffset = CGSizeMake(0.1, 6.1); 63 | CGFloat outerShadowBlurRadius = 13; 64 | UIColor* highlightShadow = bubbleHighlightColor; 65 | CGSize highlightShadowOffset = CGSizeMake(0.1, 2.1); 66 | CGFloat highlightShadowBlurRadius = 0; 67 | 68 | //// Frames 69 | CGRect bubbleFrame = self.bounds; 70 | 71 | //// Subframes 72 | CGRect arrowFrame = CGRectMake(CGRectGetMinX(bubbleFrame) + floor((CGRectGetWidth(bubbleFrame) - 59) * 0.50462 + 0.5), CGRectGetMinY(bubbleFrame) + CGRectGetHeight(bubbleFrame) - 46, 59, 46); 73 | 74 | 75 | //// Bubble Drawing 76 | UIBezierPath* bubblePath = [UIBezierPath bezierPath]; 77 | [bubblePath moveToPoint: CGPointMake(CGRectGetMaxX(bubbleFrame) - 12, CGRectGetMinY(bubbleFrame) + 28.5)]; 78 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMaxX(bubbleFrame) - 12, CGRectGetMaxY(bubbleFrame) - 27.5)]; 79 | [bubblePath addCurveToPoint: CGPointMake(CGRectGetMaxX(bubbleFrame) - 25, CGRectGetMaxY(bubbleFrame) - 14.5) controlPoint1: CGPointMake(CGRectGetMaxX(bubbleFrame) - 12, CGRectGetMaxY(bubbleFrame) - 20.32) controlPoint2: CGPointMake(CGRectGetMaxX(bubbleFrame) - 17.82, CGRectGetMaxY(bubbleFrame) - 14.5)]; 80 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMinX(arrowFrame) + 40.5, CGRectGetMaxY(arrowFrame) - 13.5)]; 81 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMinX(arrowFrame) + 29.5, CGRectGetMaxY(arrowFrame) - 0.5)]; 82 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMinX(arrowFrame) + 18.5, CGRectGetMaxY(arrowFrame) - 13.5)]; 83 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 26.5, CGRectGetMaxY(bubbleFrame) - 14.5)]; 84 | [bubblePath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 13.5, CGRectGetMaxY(bubbleFrame) - 27.5) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 19.32, CGRectGetMaxY(bubbleFrame) - 14.5) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 13.5, CGRectGetMaxY(bubbleFrame) - 20.32)]; 85 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 13.5, CGRectGetMinY(bubbleFrame) + 28.5)]; 86 | [bubblePath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 26.5, CGRectGetMinY(bubbleFrame) + 15.5) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 13.5, CGRectGetMinY(bubbleFrame) + 21.32) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 19.32, CGRectGetMinY(bubbleFrame) + 15.5)]; 87 | [bubblePath addLineToPoint: CGPointMake(CGRectGetMaxX(bubbleFrame) - 25, CGRectGetMinY(bubbleFrame) + 15.5)]; 88 | [bubblePath addCurveToPoint: CGPointMake(CGRectGetMaxX(bubbleFrame) - 12, CGRectGetMinY(bubbleFrame) + 28.5) controlPoint1: CGPointMake(CGRectGetMaxX(bubbleFrame) - 17.82, CGRectGetMinY(bubbleFrame) + 15.5) controlPoint2: CGPointMake(CGRectGetMaxX(bubbleFrame) - 12, CGRectGetMinY(bubbleFrame) + 21.32)]; 89 | [bubblePath closePath]; 90 | CGContextSaveGState(context); 91 | CGContextSetShadowWithColor(context, outerShadowOffset, outerShadowBlurRadius, outerShadow.CGColor); 92 | CGContextBeginTransparencyLayer(context, NULL); 93 | [bubblePath addClip]; 94 | CGRect bubbleBounds = CGPathGetPathBoundingBox(bubblePath.CGPath); 95 | CGContextDrawLinearGradient(context, bubbleGradient, 96 | CGPointMake(CGRectGetMidX(bubbleBounds), CGRectGetMinY(bubbleBounds)), 97 | CGPointMake(CGRectGetMidX(bubbleBounds), CGRectGetMaxY(bubbleBounds)), 98 | 0); 99 | CGContextEndTransparencyLayer(context); 100 | 101 | ////// Bubble Inner Shadow 102 | CGRect bubbleBorderRect = CGRectInset([bubblePath bounds], -highlightShadowBlurRadius, -highlightShadowBlurRadius); 103 | bubbleBorderRect = CGRectOffset(bubbleBorderRect, -highlightShadowOffset.width, -highlightShadowOffset.height); 104 | bubbleBorderRect = CGRectInset(CGRectUnion(bubbleBorderRect, [bubblePath bounds]), -1, -1); 105 | 106 | UIBezierPath* bubbleNegativePath = [UIBezierPath bezierPathWithRect: bubbleBorderRect]; 107 | [bubbleNegativePath appendPath: bubblePath]; 108 | bubbleNegativePath.usesEvenOddFillRule = YES; 109 | 110 | CGContextSaveGState(context); 111 | { 112 | CGFloat xOffset = highlightShadowOffset.width + round(bubbleBorderRect.size.width); 113 | CGFloat yOffset = highlightShadowOffset.height; 114 | CGContextSetShadowWithColor(context, 115 | CGSizeMake(xOffset + copysign(0.1, xOffset), yOffset + copysign(0.1, yOffset)), 116 | highlightShadowBlurRadius, 117 | highlightShadow.CGColor); 118 | 119 | [bubblePath addClip]; 120 | CGAffineTransform transform = CGAffineTransformMakeTranslation(-round(bubbleBorderRect.size.width), 0); 121 | [bubbleNegativePath applyTransform: transform]; 122 | [[UIColor grayColor] setFill]; 123 | [bubbleNegativePath fill]; 124 | } 125 | CGContextRestoreGState(context); 126 | 127 | CGContextRestoreGState(context); 128 | 129 | [bubbleStrokeColor setStroke]; 130 | bubblePath.lineWidth = 1; 131 | [bubblePath stroke]; 132 | 133 | 134 | //// Cleanup 135 | CGGradientRelease(bubbleGradient); 136 | CGColorSpaceRelease(colorSpace); 137 | 138 | 139 | 140 | } 141 | 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SASliderLeft.h: -------------------------------------------------------------------------------- 1 | // 2 | // SASliderLeft.h 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | 28 | @interface SASliderLeft : UIView 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SASliderLeft.m: -------------------------------------------------------------------------------- 1 | // 2 | // SASliderLeft.m 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "SASliderLeft.h" 27 | 28 | @implementation SASliderLeft 29 | 30 | - (id)initWithFrame:(CGRect)frame 31 | { 32 | self = [super initWithFrame:frame]; 33 | if (self) { 34 | // Initialization code 35 | } 36 | return self; 37 | } 38 | 39 | 40 | // Only override drawRect: if you perform custom drawing. 41 | // An empty implementation adversely affects performance during animation. 42 | - (void)drawRect:(CGRect)rect 43 | { 44 | //// General Declarations 45 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 46 | CGContextRef context = UIGraphicsGetCurrentContext(); 47 | 48 | //// Color Declarations 49 | UIColor* color5 = [UIColor colorWithRed: 0.992 green: 0.902 blue: 0.004 alpha: 1]; 50 | UIColor* gradientColor2 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; 51 | UIColor* color6 = [UIColor colorWithRed: 0.196 green: 0.161 blue: 0.047 alpha: 1]; 52 | 53 | //// Gradient Declarations 54 | NSArray* gradient3Colors = [NSArray arrayWithObjects: 55 | (id)gradientColor2.CGColor, 56 | (id)[UIColor colorWithRed: 0.996 green: 0.951 blue: 0.502 alpha: 1].CGColor, 57 | (id)color5.CGColor, nil]; 58 | CGFloat gradient3Locations[] = {0, 0, 0.49}; 59 | CGGradientRef gradient3 = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)gradient3Colors, gradient3Locations); 60 | 61 | //// Frames 62 | CGRect bubbleFrame = self.bounds; 63 | 64 | 65 | //// Rounded Rectangle Drawing 66 | CGRect roundedRectangleRect = CGRectMake(CGRectGetMinX(bubbleFrame), CGRectGetMinY(bubbleFrame), CGRectGetWidth(bubbleFrame), CGRectGetHeight(bubbleFrame)); 67 | UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: roundedRectangleRect byRoundingCorners: UIRectCornerTopLeft | UIRectCornerBottomLeft cornerRadii: CGSizeMake(5, 5)]; 68 | [roundedRectanglePath closePath]; 69 | CGContextSaveGState(context); 70 | [roundedRectanglePath addClip]; 71 | CGContextDrawLinearGradient(context, gradient3, 72 | CGPointMake(CGRectGetMidX(roundedRectangleRect), CGRectGetMinY(roundedRectangleRect)), 73 | CGPointMake(CGRectGetMidX(roundedRectangleRect), CGRectGetMaxY(roundedRectangleRect)), 74 | 0); 75 | CGContextRestoreGState(context); 76 | [[UIColor clearColor] setStroke]; 77 | roundedRectanglePath.lineWidth = 0.5; 78 | [roundedRectanglePath stroke]; 79 | 80 | 81 | //// Bezier 3 Drawing 82 | UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; 83 | [bezier3Path moveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 84 | [bezier3Path addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 85 | [bezier3Path addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame))]; 86 | [bezier3Path addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 87 | [bezier3Path addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 88 | [bezier3Path closePath]; 89 | bezier3Path.miterLimit = 19; 90 | 91 | [color6 setFill]; 92 | [bezier3Path fill]; 93 | 94 | 95 | //// Bezier Drawing 96 | UIBezierPath* bezierPath = [UIBezierPath bezierPath]; 97 | [bezierPath moveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 98 | [bezierPath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 99 | [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame))]; 100 | [bezierPath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 101 | [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 102 | [bezierPath closePath]; 103 | bezierPath.miterLimit = 19; 104 | 105 | [color6 setFill]; 106 | [bezierPath fill]; 107 | 108 | 109 | //// Cleanup 110 | CGGradientRelease(gradient3); 111 | CGColorSpaceRelease(colorSpace); 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | } 121 | 122 | 123 | @end 124 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SASliderRight.h: -------------------------------------------------------------------------------- 1 | // 2 | // SASliderRight.h 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | 28 | @interface SASliderRight : UIView 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SASliderRight.m: -------------------------------------------------------------------------------- 1 | // 2 | // SASliderRight.m 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "SASliderRight.h" 27 | 28 | @implementation SASliderRight 29 | 30 | - (id)initWithFrame:(CGRect)frame 31 | { 32 | self = [super initWithFrame:frame]; 33 | if (self) { 34 | // Initialization code 35 | } 36 | return self; 37 | } 38 | 39 | 40 | // Only override drawRect: if you perform custom drawing. 41 | // An empty implementation adversely affects performance during animation. 42 | - (void)drawRect:(CGRect)rect 43 | { 44 | // Drawing code 45 | 46 | //// General Declarations 47 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 48 | CGContextRef context = UIGraphicsGetCurrentContext(); 49 | 50 | //// Color Declarations 51 | UIColor* color5 = [UIColor colorWithRed: 0.992 green: 0.902 blue: 0.004 alpha: 1]; 52 | UIColor* gradientColor2 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; 53 | UIColor* color6 = [UIColor colorWithRed: 0.196 green: 0.161 blue: 0.047 alpha: 1]; 54 | 55 | //// Gradient Declarations 56 | NSArray* gradient3Colors = [NSArray arrayWithObjects: 57 | (id)gradientColor2.CGColor, 58 | (id)[UIColor colorWithRed: 0.996 green: 0.951 blue: 0.502 alpha: 1].CGColor, 59 | (id)color5.CGColor, nil]; 60 | CGFloat gradient3Locations[] = {0, 0, 0.49}; 61 | CGGradientRef gradient3 = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)gradient3Colors, gradient3Locations); 62 | 63 | //// Frames 64 | CGRect bubbleFrame = self.bounds; 65 | 66 | 67 | //// Rounded Rectangle Drawing 68 | CGRect roundedRectangleRect = CGRectMake(CGRectGetMinX(bubbleFrame), CGRectGetMinY(bubbleFrame), CGRectGetWidth(bubbleFrame), CGRectGetHeight(bubbleFrame)); 69 | UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: roundedRectangleRect byRoundingCorners: UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii: CGSizeMake(5, 5)]; 70 | [roundedRectanglePath closePath]; 71 | CGContextSaveGState(context); 72 | [roundedRectanglePath addClip]; 73 | CGContextDrawLinearGradient(context, gradient3, 74 | CGPointMake(CGRectGetMidX(roundedRectangleRect), CGRectGetMinY(roundedRectangleRect)), 75 | CGPointMake(CGRectGetMidX(roundedRectangleRect), CGRectGetMaxY(roundedRectangleRect)), 76 | 0); 77 | CGContextRestoreGState(context); 78 | [[UIColor clearColor] setStroke]; 79 | roundedRectanglePath.lineWidth = 0.5; 80 | [roundedRectanglePath stroke]; 81 | 82 | 83 | //// Bezier 3 Drawing 84 | UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; 85 | [bezier3Path moveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 86 | [bezier3Path addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 87 | [bezier3Path addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame))]; 88 | [bezier3Path addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.35577 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 89 | [bezier3Path addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.42806 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 90 | [bezier3Path closePath]; 91 | bezier3Path.miterLimit = 19; 92 | 93 | [color6 setFill]; 94 | [bezier3Path fill]; 95 | 96 | 97 | //// Bezier Drawing 98 | UIBezierPath* bezierPath = [UIBezierPath bezierPath]; 99 | [bezierPath moveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 100 | [bezierPath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 101 | [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.74629 * CGRectGetHeight(bubbleFrame))]; 102 | [bezierPath addCurveToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame)) controlPoint1: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame)) controlPoint2: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.59715 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.69415 * CGRectGetHeight(bubbleFrame))]; 103 | [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(bubbleFrame) + 0.66944 * CGRectGetWidth(bubbleFrame), CGRectGetMinY(bubbleFrame) + 0.22486 * CGRectGetHeight(bubbleFrame))]; 104 | [bezierPath closePath]; 105 | bezierPath.miterLimit = 19; 106 | 107 | [color6 setFill]; 108 | [bezierPath fill]; 109 | 110 | 111 | //// Cleanup 112 | CGGradientRelease(gradient3); 113 | CGColorSpaceRelease(colorSpace); 114 | 115 | 116 | 117 | 118 | 119 | } 120 | 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /SAVideoRangeSlider/SAVideoRangeSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAVideoRangeSlider.h 3 | // 4 | // This code is distributed under the terms and conditions of the MIT license. 5 | // 6 | // Copyright (c) 2013 Andrei Solovjev - http://solovjev.com/ 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import "SASliderLeft.h" 31 | #import "SASliderRight.h" 32 | #import "SAResizibleBubble.h" 33 | 34 | 35 | @protocol SAVideoRangeSliderDelegate; 36 | 37 | @interface SAVideoRangeSlider : UIView 38 | 39 | 40 | @property (nonatomic, weak) id delegate; 41 | @property (nonatomic) CGFloat leftPosition; 42 | @property (nonatomic) CGFloat rightPosition; 43 | @property (nonatomic, strong) UILabel *bubleText; 44 | @property (nonatomic, strong) UIView *topBorder; 45 | @property (nonatomic, strong) UIView *bottomBorder; 46 | 47 | 48 | - (id)initWithFrame:(CGRect)frame videoUrl:(NSURL *)videoUrl; 49 | - (void)setPopoverBubbleSize: (CGFloat) width height:(CGFloat)height; 50 | 51 | 52 | @end 53 | 54 | 55 | @protocol SAVideoRangeSliderDelegate 56 | 57 | @optional 58 | 59 | - (void)videoRange:(SAVideoRangeSlider *)videoRange didChangeLeftPosition:(CGFloat)leftPosition rightPosition:(CGFloat)rightPosition; 60 | 61 | - (void)videoRange:(SAVideoRangeSlider *)videoRange didGestureStateEndedLeftPosition:(CGFloat)leftPosition rightPosition:(CGFloat)rightPosition; 62 | 63 | 64 | @end 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSGroupSpecifier 10 | Title 11 | Recording Settings 12 | 13 | 14 | Type 15 | PSMultiValueSpecifier 16 | Title 17 | Record 18 | Key 19 | record 20 | DefaultValue 21 | 0 22 | Titles 23 | 24 | Screen Only 25 | 26 | Values 27 | 28 | 0 29 | 30 | 31 | 32 | Type 33 | PSGroupSpecifier 34 | Title 35 | Video Settings 36 | 37 | 38 | Type 39 | PSMultiValueSpecifier 40 | Title 41 | Video Size 42 | Key 43 | vidsize 44 | DefaultValue 45 | 1 46 | Titles 47 | 48 | Native 49 | Half 50 | 51 | Values 52 | 53 | 1 54 | 0 55 | 56 | 57 | 58 | Type 59 | PSMultiValueSpecifier 60 | Title 61 | Video Orientation 62 | Key 63 | vidorientation 64 | DefaultValue 65 | 0 66 | Titles 67 | 68 | Portrait 69 | Landscape (Home Button To Left) 70 | Landscape (Home Button To Right) 71 | Portrait (Upside Down) 72 | 73 | Values 74 | 75 | 0 76 | 1.57079633 77 | 4.71238898 78 | 3.14159265 79 | 80 | 81 | 82 | Type 83 | PSGroupSpecifier 84 | Title 85 | Audio Settings 86 | 87 | 88 | Type 89 | PSMultiValueSpecifier 90 | Title 91 | Sample Rate 92 | Key 93 | samplerate 94 | DefaultValue 95 | 44100 96 | Titles 97 | 98 | 44100 Hz 99 | 22050 Hz 100 | 16000 Hz 101 | 11025 Hz 102 | 8000 Hz 103 | 104 | Values 105 | 106 | 44100 107 | 22050 108 | 16000 109 | 11025 110 | 8000 111 | 112 | 113 | 114 | Type 115 | PSMultiValueSpecifier 116 | Title 117 | Channels 118 | Key 119 | channels 120 | DefaultValue 121 | 2 122 | Titles 123 | 124 | Mono 125 | Stereo 126 | 127 | Values 128 | 129 | 1 130 | 2 131 | 132 | 133 | 134 | StringsTable 135 | Root 136 | 137 | 138 | -------------------------------------------------------------------------------- /Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/icon.png -------------------------------------------------------------------------------- /icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/icon@2x.png -------------------------------------------------------------------------------- /icon~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/icon~ipad.png -------------------------------------------------------------------------------- /icon~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/icon~ipad@2x.png -------------------------------------------------------------------------------- /recordmyscreentweak/ActivatorListener.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import "CSRecordQueryWindow.h" 5 | #import "CSRecordCompletionAlert.h" 6 | #import "../RecordMyScreen/CSScreenRecorder.h" 7 | 8 | typedef void(^RecordMyScreenCallback)(void); 9 | 10 | @interface CSRecordMyScreenListener : NSObject { 11 | CSScreenRecorder *_screenRecorder; 12 | } 13 | @end 14 | 15 | @implementation CSRecordMyScreenListener 16 | 17 | +(void)load { 18 | [[LAActivator sharedInstance] registerListener:[self new] forName:@"org.coolstar.recordmyscreen"]; 19 | } 20 | 21 | - (void)activator:(LAActivator *)listener receiveEvent:(LAEvent *)event 22 | { 23 | if (!_screenRecorder){ 24 | CSRecordQueryWindow *queryWindow = [[CSRecordQueryWindow alloc] initWithFrame:CGRectMake(0,0,320,150)]; 25 | queryWindow.center = CGPointMake([[UIScreen mainScreen] bounds].size.width/2, [[UIScreen mainScreen] bounds].size.height/2); 26 | queryWindow.onConfirmation = ^{ 27 | _screenRecorder = [[CSScreenRecorder alloc] init]; 28 | 29 | NSString *videoPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/video.mp4"]; 30 | //if (![[[NSUserDefaults standardUserDefaults] objectForKey:@"record"] boolValue]) { 31 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 32 | [dateFormatter setDateFormat:@"MM:dd:yyyy h:mm:ss a"]; 33 | NSString *date = [dateFormatter stringFromDate:[NSDate date]]; 34 | NSString *outName = [NSString stringWithFormat:@"Documents/%@.mp4",date]; 35 | videoPath = [NSHomeDirectory() stringByAppendingPathComponent:outName]; 36 | [dateFormatter release]; 37 | //} 38 | 39 | // Set the number of audio channels 40 | NSNumber *audioChannels = [[NSUserDefaults standardUserDefaults] objectForKey:@"channels"]; 41 | NSNumber *sampleRate = [[NSUserDefaults standardUserDefaults] objectForKey:@"samplerate"]; 42 | NSString *audioPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/audio.caf"]; 43 | 44 | _screenRecorder.videoOutPath = videoPath; 45 | _screenRecorder.audioOutPath = audioPath; 46 | _screenRecorder.numberOfAudioChannels = audioChannels; 47 | _screenRecorder.audioSampleRate = sampleRate; 48 | [_screenRecorder startRecordingScreen]; 49 | }; 50 | } else { 51 | [_screenRecorder stopRecordingScreen]; 52 | CSRecordCompletionAlert *completionAlert = [[CSRecordCompletionAlert alloc] initWithFrame:CGRectMake(0,0,320,150)]; 53 | completionAlert.center = CGPointMake([[UIScreen mainScreen] bounds].size.width/2, [[UIScreen mainScreen] bounds].size.height/2); 54 | } 55 | [event setHandled:YES]; 56 | } 57 | 58 | -(void)activator:(LAActivator *)listener abortEvent:(LAEvent *)event 59 | { 60 | } 61 | 62 | - (void)screenRecorderDidStopRecording:(CSScreenRecorder *)recorder { 63 | [_screenRecorder release]; 64 | _screenRecorder = nil; 65 | } 66 | 67 | @end; -------------------------------------------------------------------------------- /recordmyscreentweak/CSRecordCompletionAlert.h: -------------------------------------------------------------------------------- 1 | #import "CSWindow.h" 2 | 3 | @interface CSRecordCompletionAlert : CSWindow 4 | 5 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/CSRecordCompletionAlert.m: -------------------------------------------------------------------------------- 1 | #import "CSRecordCompletionAlert.h" 2 | #import 3 | 4 | @implementation CSRecordCompletionAlert 5 | 6 | - (CSRecordCompletionAlert *)initWithFrame:(CGRect)frame { 7 | self = [super initWithFrame:frame title:@"RecordMyScreen"]; 8 | if (self){ 9 | UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"/Library/Application Support/RecordMyScreen/lens.png"]]; 10 | [background setBackgroundColor:[UIColor blackColor]]; 11 | background.frame = self.bounds; 12 | background.contentMode = UIViewContentModeScaleAspectFit; 13 | background.alpha = 0.65; 14 | [self addSubview:[background autorelease]]; 15 | 16 | UILabel *recordMyScreenText = [[UILabel alloc] initWithFrame:CGRectMake(0,50,320,40)]; 17 | [recordMyScreenText setText:NSLocalizedString(@"Recording saved sucessfully.",@"")]; 18 | [recordMyScreenText setTextAlignment:UITextAlignmentCenter]; 19 | [recordMyScreenText setTextColor:[UIColor whiteColor]]; 20 | [recordMyScreenText setLineBreakMode:UILineBreakModeWordWrap]; 21 | [recordMyScreenText setBackgroundColor:[UIColor clearColor]]; 22 | [self addSubview:[recordMyScreenText autorelease]]; 23 | 24 | UIFont *font = [UIFont boldSystemFontOfSize:16.0f]; 25 | NSDictionary *attributes = [NSDictionary dictionaryWithObject:font 26 | forKey:UITextAttributeFont]; 27 | 28 | UISegmentedControl *okButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"OK"]]; 29 | okButton.frame = CGRectMake(15,100,290,43); 30 | okButton.momentary = YES; 31 | okButton.segmentedControlStyle = UISegmentedControlStyleBar; 32 | okButton.tintColor = [UIColor grayColor]; 33 | [okButton setTitleTextAttributes:attributes 34 | forState:UIControlStateNormal]; 35 | [okButton addTarget:self action:@selector(close:) forControlEvents:UIControlEventValueChanged]; 36 | [self addSubview:[okButton autorelease]]; 37 | } 38 | return self; 39 | } 40 | 41 | - (void)close:(id)sender { 42 | [UIView animateWithDuration:0.25f 43 | animations:^{ 44 | [self setAlpha:0]; 45 | } completion:^(BOOL finished){ 46 | [self resignKeyWindow]; 47 | [self setHidden:YES]; 48 | [self release]; 49 | }]; 50 | } 51 | 52 | - (void)dealloc { 53 | [super dealloc]; 54 | } 55 | 56 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/CSRecordQueryWindow.h: -------------------------------------------------------------------------------- 1 | #import "CSWindow.h" 2 | 3 | typedef void(^RecordMyScreenCallback)(void); 4 | 5 | @interface CSRecordQueryWindow : CSWindow 6 | @property (nonatomic, copy) RecordMyScreenCallback onConfirmation; 7 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/CSRecordQueryWindow.m: -------------------------------------------------------------------------------- 1 | #import "CSRecordQueryWindow.h" 2 | #import 3 | 4 | @implementation CSRecordQueryWindow 5 | 6 | - (CSRecordQueryWindow *)initWithFrame:(CGRect)frame { 7 | self = [super initWithFrame:frame title:@"RecordMyScreen"]; 8 | if (self){ 9 | UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"/Library/Application Support/RecordMyScreen/lens.png"]]; 10 | [background setBackgroundColor:[UIColor blackColor]]; 11 | background.frame = self.bounds; 12 | background.contentMode = UIViewContentModeScaleAspectFit; 13 | background.alpha = 0.65; 14 | [self addSubview:[background autorelease]]; 15 | 16 | UILabel *recordMyScreenText = [[UILabel alloc] initWithFrame:CGRectMake(0,50,320,40)]; 17 | [recordMyScreenText setText:NSLocalizedString(@"Do you wish to start recording?",@"")]; 18 | [recordMyScreenText setTextAlignment:UITextAlignmentCenter]; 19 | [recordMyScreenText setTextColor:[UIColor whiteColor]]; 20 | [recordMyScreenText setLineBreakMode:UILineBreakModeWordWrap]; 21 | [recordMyScreenText setBackgroundColor:[UIColor clearColor]]; 22 | [self addSubview:[recordMyScreenText autorelease]]; 23 | 24 | UIFont *font = [UIFont boldSystemFontOfSize:16.0f]; 25 | NSDictionary *attributes = [NSDictionary dictionaryWithObject:font 26 | forKey:UITextAttributeFont]; 27 | 28 | UISegmentedControl *cancelButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"Cancel"]]; 29 | cancelButton.frame = CGRectMake(15,100,130,43); 30 | cancelButton.momentary = YES; 31 | cancelButton.segmentedControlStyle = UISegmentedControlStyleBar; 32 | cancelButton.tintColor = [UIColor grayColor]; 33 | [cancelButton setTitleTextAttributes:attributes 34 | forState:UIControlStateNormal]; 35 | [cancelButton addTarget:self action:@selector(close:) forControlEvents:UIControlEventValueChanged]; 36 | [self addSubview:[cancelButton autorelease]]; 37 | 38 | UISegmentedControl *recordButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"Record"]]; 39 | recordButton.frame = CGRectMake(175,100,130,43); 40 | recordButton.momentary = YES; 41 | recordButton.segmentedControlStyle = UISegmentedControlStyleBar; 42 | recordButton.tintColor = [UIColor colorWithRed:0 green:0.75 blue:0 alpha:1]; 43 | [recordButton setTitleTextAttributes:attributes 44 | forState:UIControlStateNormal]; 45 | [recordButton addTarget:self action:@selector(record:) forControlEvents:UIControlEventValueChanged]; 46 | [self addSubview:[recordButton autorelease]]; 47 | } 48 | return self; 49 | } 50 | 51 | - (void)record:(id)sender { 52 | self.onConfirmation(); 53 | [self close:sender]; 54 | } 55 | 56 | - (void)close:(id)sender { 57 | [UIView animateWithDuration:0.25f 58 | animations:^{ 59 | [self setAlpha:0]; 60 | } completion:^(BOOL finished){ 61 | [self resignKeyWindow]; 62 | [self setHidden:YES]; 63 | [self release]; 64 | }]; 65 | } 66 | 67 | - (void)dealloc { 68 | [super dealloc]; 69 | } 70 | 71 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/CSWindow.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CSWindow : UIWindow 4 | 5 | - (CSWindow *)initWithFrame:(CGRect)frame title:(NSString *)titleText; 6 | 7 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/CSWindow.m: -------------------------------------------------------------------------------- 1 | #import "CSWindow.h" 2 | #import 3 | 4 | @interface CSWindow () { 5 | UILabel *title; 6 | float dragOffsetX,dragOffsetY; 7 | } 8 | @end 9 | 10 | @implementation CSWindow 11 | 12 | - (CSWindow *)initWithFrame:(CGRect)frame title:(NSString *)titleText { 13 | self = [super initWithFrame:frame]; 14 | if (self){ 15 | [self setWindowLevel:9999.0f]; //It's over NINE THOUSAND!!! 16 | [self setBackgroundColor:[[UIColor grayColor] colorWithAlphaComponent:(2.0f / 255.0f)]]; 17 | [self.layer setCornerRadius:10.0f]; 18 | [self.layer setBorderColor:[[UIColor whiteColor] CGColor]]; 19 | [self.layer setBorderWidth:1.0f]; 20 | [self setClipsToBounds:YES]; 21 | [self makeKeyAndVisible]; 22 | 23 | title = [[UILabel alloc] initWithFrame:CGRectMake(0,0,frame.size.width,43)]; 24 | [title setFont:[UIFont boldSystemFontOfSize:16.0f]]; 25 | [title setText:titleText]; 26 | [title setTextAlignment:UITextAlignmentCenter]; 27 | [title setTextColor:[UIColor whiteColor]]; 28 | [title setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.5]]; 29 | [title setUserInteractionEnabled:YES]; 30 | [title.layer setZPosition:9999.0f]; //It's over NINE THOUSAND!!! 31 | [self addSubview:[title autorelease]]; 32 | 33 | UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(move:)]; 34 | [panRecognizer setMinimumNumberOfTouches:1]; 35 | [panRecognizer setMaximumNumberOfTouches:1]; 36 | [panRecognizer setDelegate:self]; 37 | [title addGestureRecognizer:panRecognizer]; 38 | [panRecognizer release]; 39 | 40 | [self attachPopUpAnimation]; 41 | } 42 | return self; 43 | } 44 | 45 | - (void) attachPopUpAnimation 46 | { 47 | CAKeyframeAnimation *animation = [CAKeyframeAnimation 48 | animationWithKeyPath:@"transform"]; 49 | 50 | CATransform3D scale1 = CATransform3DMakeScale(0.5, 0.5, 1); 51 | CATransform3D scale2 = CATransform3DMakeScale(1.2, 1.2, 1); 52 | CATransform3D scale3 = CATransform3DMakeScale(0.9, 0.9, 1); 53 | CATransform3D scale4 = CATransform3DMakeScale(1.0, 1.0, 1); 54 | 55 | NSArray *frameValues = [NSArray arrayWithObjects: 56 | [NSValue valueWithCATransform3D:scale1], 57 | [NSValue valueWithCATransform3D:scale2], 58 | [NSValue valueWithCATransform3D:scale3], 59 | [NSValue valueWithCATransform3D:scale4], 60 | nil]; 61 | [animation setValues:frameValues]; 62 | 63 | NSArray *frameTimes = [NSArray arrayWithObjects: 64 | [NSNumber numberWithFloat:0.0], 65 | [NSNumber numberWithFloat:0.5], 66 | [NSNumber numberWithFloat:0.9], 67 | [NSNumber numberWithFloat:1.0], 68 | nil]; 69 | [animation setKeyTimes:frameTimes]; 70 | 71 | animation.fillMode = kCAFillModeForwards; 72 | animation.removedOnCompletion = NO; 73 | animation.duration = 0.25f; 74 | 75 | [self.layer addAnimation:animation forKey:@"popup"]; 76 | } 77 | 78 | #pragma mark begin UIGestureRecognizer stuff 79 | 80 | - (void)move:(UIPanGestureRecognizer *)sender { 81 | CGPoint translatedPoint = [sender translationInView:title]; 82 | CGPoint convertedPoint = [self convertPoint:translatedPoint fromView:title]; 83 | if (sender.state == UIGestureRecognizerStateBegan){ 84 | dragOffsetX = self.center.x - convertedPoint.x; 85 | dragOffsetY = self.center.y - convertedPoint.y; 86 | } 87 | self.center = CGPointMake(convertedPoint.x+dragOffsetX,convertedPoint.y+dragOffsetY); 88 | } 89 | 90 | - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { 91 | return YES; 92 | } 93 | 94 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 95 | return YES; 96 | } 97 | 98 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 99 | return YES; 100 | } 101 | 102 | #pragma mark end UIGestureRecognizer stuff 103 | 104 | @end -------------------------------------------------------------------------------- /recordmyscreentweak/Makefile: -------------------------------------------------------------------------------- 1 | TARGET=:clang 2 | include theos/makefiles/common.mk 3 | 4 | TWEAK_NAME = RecordMyScreenTweak 5 | RecordMyScreenTweak_FILES = ActivatorListener.mm ../RecordMyScreen/CSScreenRecorder.m CSWindow.m CSRecordQueryWindow.m CSRecordCompletionAlert.m 6 | RecordMyScreenTweak_FRAMEWORKS = CoreGraphics QuartzCore UIKit AVFoundation CoreVideo CoreMedia 7 | RecordMyScreenTweak_PRIVATE_FRAMEWORKS = IOSurface 8 | RecordMyScreenTweak_CFLAGS = -I../RecordMyScreen/headers/ -I../RecordMyScreen/headers/Headers 9 | RecordMyScreenTweak_LDFLAGS = -lactivator 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /recordmyscreentweak/RecordMyScreenTweak.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /recordmyscreentweak/control: -------------------------------------------------------------------------------- 1 | Package: org.coolstar.recordmyscreentweak 2 | Name: RecordMyScreen (Tweak) 3 | Depends: mobilesubstrate 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: An awesome MobileSubstrate tweak! 7 | Maintainer: RecordMyScreen Project 8 | Author: RecordMyScreen Project 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /recordmyscreentweak/layout/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: org.coolstar.recordmyscreentweak 2 | Name: RecordMyScreen (Tweak) 3 | Depends: mobilesubstrate 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: An awesome MobileSubstrate tweak! 7 | Maintainer: RecordMyScreen Project 8 | Author: RecordMyScreen Project 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /recordmyscreentweak/layout/Library/Application Support/RecordMyScreen/lens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/recordmyscreentweak/layout/Library/Application Support/RecordMyScreen/lens.png -------------------------------------------------------------------------------- /recordmyscreentweak/layout/Library/Application Support/RecordMyScreen/lens@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canvasding/RecordMyScreen/1694617ef5533a67d3365bb622adf85f60d01708/recordmyscreentweak/layout/Library/Application Support/RecordMyScreen/lens@2x.png -------------------------------------------------------------------------------- /recordmyscreentweak/layout/Library/MobileSubstrate/DynamicLibraries/RecordMyScreenTweak.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /recordmyscreentweak/theos: -------------------------------------------------------------------------------- 1 | /opt/theos --------------------------------------------------------------------------------