-
Notifications
You must be signed in to change notification settings - Fork 3
/
objc_runtime_getters.h
executable file
·62 lines (43 loc) · 2.03 KB
/
objc_runtime_getters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// objc_runtime_getters.h
// injected_library
//
// Created by Sophia Wisdom on 3/10/20.
// Copyright © 2020 Sophia Wisdom. All rights reserved.
//
#include <stdio.h>
#import <Foundation/Foundation.h>
@class CALayer;
@class SerializedLayerTree;
@class NSBitmapImageRep;
/**
* This file is bound to the Process API. It represents bindings between the Process API and <objc/runtime.h>
*/
// TODO: add some kind of method to do several of these at once guided by predicates
// Returns NSArray<NSString *> * where strings are image names for process
NSArray<NSString *> * get_images(void);
// Returns NSArray<NSString *> * where strings are class names for given image.
// takes serialized NSString *
NSArray<NSString *> * get_classes_for_image(NSString *image);
// Returns NSArray<NSDictionary *> *, where the array is for each method on the class
// (not on the superclass) and the NSDictionary has three keys:
// 1: @"sel" - the selector for that method
// 2: @"type" - the objective c type string
// 3: @"imp" - the pointer to the implementation for that method. The end is not given
// by the objective-c runtime and must be determined by looking at the output.
NSArray<NSDictionary<NSString *, id> *> * get_methods_for_class(NSString *serializedClass);
// Get superclass for class. Takes NSString * class name and returns NSString * superclass name.
NSString * get_superclass_for_class(NSString *className);
NSString * get_executable_image(void);
NSNumber *load_dylib(NSString *dylib);
NSString *replace_methods(NSArray<NSDictionary<NSString *, id> *> *switches);
NSArray<NSDictionary *> * get_properties_for_class(NSString *className);
NSArray<NSString *> *get_layer_images(void);
NSArray<CALayer *> *get_layers(void);
NSArray<NSArray<id> *> *getIvars(NSString *class);
NSString *get_image_for_class(NSString *class);
SerializedLayerTree * get_serialized_layers(void);
NSData *get_window_picture(void);
NSValue *get_window_size();
// Will fail if the invocation returns something other than an `id`
id execute_invocation(NSInvocation * pointer);