diff --git a/api/appkit/nsdatepicker.objc.json b/api/appkit/nsdatepicker.objc.json index f25d2b95..7f2c94b5 100644 --- a/api/appkit/nsdatepicker.objc.json +++ b/api/appkit/nsdatepicker.objc.json @@ -217,6 +217,6 @@ }, "APICollection": null, "Kind": "class", - "PullDate": "2023-07-06T15:16:27.493347-07:00", + "PullDate": "2023-07-22T18:19:51.386368-04:00", "Version": 2 } \ No newline at end of file diff --git a/api/appkit/nsprogressindicator.objc.json b/api/appkit/nsprogressindicator.objc.json new file mode 100644 index 00000000..91103b91 --- /dev/null +++ b/api/appkit/nsprogressindicator.objc.json @@ -0,0 +1,255 @@ +{ + "Class": { + "Name": "NSProgressIndicator", + "Description": "An interface that provides visual feedback to the user about the status of an ongoing task.", + "Declaration": "@interface NSProgressIndicator : NSView", + "Platforms": [ + "macOS 10.0+" + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator?language=objc", + "InstanceMethods": [ + { + "Name": "startAnimation:", + "Description": "Starts the animation of an indeterminate progress indicator.", + "Declaration": "- (void)startAnimation:(id)sender;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "sender", + "Type": { + "Name": "id" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501167-startanimation?language=objc", + "Unavailable": false + }, + { + "Name": "stopAnimation:", + "Description": "Stops the animation of an indeterminate progress indicator.", + "Declaration": "- (void)stopAnimation:(id)sender;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "sender", + "Type": { + "Name": "id" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501141-stopanimation?language=objc", + "Unavailable": false + }, + { + "Name": "animate:", + "Description": "This action method advances the progress animation of an indeterminate progress animator by one step.", + "Declaration": "- (void)animate:(id)sender;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "sender", + "Type": { + "Name": "id" + } + } + ], + "Deprecated": true, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501139-animate?language=objc", + "Unavailable": false + }, + { + "Name": "animationDelay", + "Description": "Returns the delay, in seconds, between animation steps for an indeterminate progress indicator.", + "Declaration": "- (NSTimeInterval)animationDelay;", + "Return": { + "Name": "NSTimeInterval" + }, + "Args": null, + "Deprecated": true, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501178-animationdelay?language=objc", + "Unavailable": false + }, + { + "Name": "setAnimationDelay:", + "Description": "Sets the delay, in seconds, between animation steps for an indeterminate progress indicator.", + "Declaration": "- (void)setAnimationDelay:(NSTimeInterval)delay;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "delay", + "Type": { + "Name": "NSTimeInterval" + } + } + ], + "Deprecated": true, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501151-setanimationdelay?language=objc", + "Unavailable": false + }, + { + "Name": "incrementBy:", + "Description": "Advances the progress bar of a determinate progress indicator by the specified amount.", + "Declaration": "- (void)incrementBy:(double)delta;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "delta", + "Type": { + "Name": "double" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501155-incrementby?language=objc", + "Unavailable": false + }, + { + "Name": "sizeToFit", + "Description": "This action method resizes the progress indicator to an appropriate size depending on the value of style.", + "Declaration": "- (void)sizeToFit;", + "Return": { + "Name": "void" + }, + "Args": null, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501144-sizetofit?language=objc", + "Unavailable": false + } + ], + "InstanceProperties": [ + { + "Name": "usesThreadedAnimation", + "Description": "A Boolean that indicates whether the progress indicator implements animation in a separate thread.", + "Declaration": "@property BOOL usesThreadedAnimation;", + "Type": { + "Name": "BOOL" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501160-usesthreadedanimation?language=objc" + }, + { + "Name": "doubleValue", + "Description": "The value that indicates the current extent of the progress indicator.", + "Declaration": "@property double doubleValue;", + "Type": { + "Name": "double" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501173-doublevalue?language=objc" + }, + { + "Name": "minValue", + "Description": "The minimum value for the progress indicator.", + "Declaration": "@property double minValue;", + "Type": { + "Name": "double" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501169-minvalue?language=objc" + }, + { + "Name": "maxValue", + "Description": "The maximum value for the progress indicator.", + "Declaration": "@property double maxValue;", + "Type": { + "Name": "double" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501165-maxvalue?language=objc" + }, + { + "Name": "observedProgress", + "Description": "The progress object to use for updating the progress view.", + "Declaration": "@property(strong) NSProgress *observedProgress;", + "Type": { + "Name": "NSProgress", + "IsPtr": true + }, + "Attrs": { + "strong": true + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/4160677-observedprogress?language=objc" + }, + { + "Name": "controlSize", + "Description": "The size of the progress indicator.", + "Declaration": "@property NSControlSize controlSize;", + "Type": { + "Name": "NSControlSize" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501157-controlsize?language=objc" + }, + { + "Name": "controlTint", + "Description": "The progress indicator’s control tint.", + "Declaration": "@property NSControlTint controlTint;", + "Type": { + "Name": "NSControlTint" + }, + "Attrs": {}, + "Deprecated": true, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501153-controltint?language=objc" + }, + { + "Name": "bezeled", + "Description": "A Boolean that indicates whether the progress indicator’s frame has a three-dimensional bezel.", + "Declaration": "@property(getter=isBezeled) BOOL bezeled;", + "Type": { + "Name": "BOOL" + }, + "Attrs": { + "getter": "isBezeled" + }, + "Deprecated": true, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501161-bezeled?language=objc" + }, + { + "Name": "indeterminate", + "Description": "A Boolean that indicates whether the progress indicator is indeterminate.", + "Declaration": "@property(getter=isIndeterminate) BOOL indeterminate;", + "Type": { + "Name": "BOOL" + }, + "Attrs": { + "getter": "isIndeterminate" + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501146-indeterminate?language=objc" + }, + { + "Name": "style", + "Description": "The style of the progress indicator (bar or spinning).", + "Declaration": "@property NSProgressIndicatorStyle style;", + "Type": { + "Name": "NSProgressIndicatorStyle" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501158-style?language=objc" + }, + { + "Name": "displayedWhenStopped", + "Description": "A Boolean that indicates whether the progress indicator hides itself when it isn’t animating.", + "Declaration": "@property(getter=isDisplayedWhenStopped) BOOL displayedWhenStopped;", + "Type": { + "Name": "BOOL" + }, + "Attrs": { + "getter": "isDisplayedWhenStopped" + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nsprogressindicator/1501171-displayedwhenstopped?language=objc" + } + ] + }, + "APICollection": null, + "Kind": "class", + "PullDate": "2023-07-22T15:39:02.849118-04:00", + "Version": 2 +} \ No newline at end of file diff --git a/api/appkit/nssegmentedcontrol.objc.json b/api/appkit/nssegmentedcontrol.objc.json new file mode 100644 index 00000000..ba01f6bd --- /dev/null +++ b/api/appkit/nssegmentedcontrol.objc.json @@ -0,0 +1,758 @@ +{ + "Class": { + "Name": "NSSegmentedControl", + "Description": "Display one or more buttons in a single horizontal group.", + "Declaration": "@interface NSSegmentedControl : NSControl", + "Platforms": [ + "macOS 10.3+" + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol?language=objc", + "InstanceMethods": [ + { + "Name": "labelForSegment:", + "Description": "Returns the label of the specified segment.", + "Declaration": "- (NSString *)labelForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSString", + "IsPtr": true + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1524322-labelforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setLabel:forSegment:", + "Description": "Sets the label for the specified segment.", + "Declaration": "- (void)setLabel:(NSString *)label \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "label", + "Type": { + "Name": "NSString", + "IsPtr": true + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1533073-setlabel?language=objc", + "Unavailable": false + }, + { + "Name": "setAlignment:forSegment:", + "Description": "", + "Declaration": "- (void)setAlignment:(NSTextAlignment)alignment \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "alignment", + "Type": { + "Name": "NSTextAlignment" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887107-setalignment?language=objc", + "Unavailable": false + }, + { + "Name": "alignmentForSegment:", + "Description": "", + "Declaration": "- (NSTextAlignment)alignmentForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSTextAlignment" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887114-alignmentforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setImage:forSegment:", + "Description": "Sets the image for the specified segment.", + "Declaration": "- (void)setImage:(NSImage *)image \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "image", + "Type": { + "Name": "NSImage", + "IsPtr": true + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525540-setimage?language=objc", + "Unavailable": false + }, + { + "Name": "imageForSegment:", + "Description": "Returns the image associated with the specified segment.", + "Declaration": "- (NSImage *)imageForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSImage", + "IsPtr": true + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1527623-imageforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setImageScaling:forSegment:", + "Description": "Sets the scaling mode used to display the specified segment’s image.", + "Declaration": "- (void)setImageScaling:(NSImageScaling)scaling \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "scaling", + "Type": { + "Name": "NSImageScaling" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1532914-setimagescaling?language=objc", + "Unavailable": false + }, + { + "Name": "imageScalingForSegment:", + "Description": "Returns the scaling mode used to display the specified segment’s image.", + "Declaration": "- (NSImageScaling)imageScalingForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSImageScaling" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1532175-imagescalingforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setMenu:forSegment:", + "Description": "Sets the menu for the specified segment.", + "Declaration": "- (void)setMenu:(NSMenu *)menu \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "menu", + "Type": { + "Name": "NSMenu", + "IsPtr": true + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1528853-setmenu?language=objc", + "Unavailable": false + }, + { + "Name": "menuForSegment:", + "Description": "Returns the menu for the specified segment.", + "Declaration": "- (NSMenu *)menuForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSMenu", + "IsPtr": true + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525880-menuforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setShowsMenuIndicator:forSegment:", + "Description": "", + "Declaration": "- (void)setShowsMenuIndicator:(BOOL)showsMenuIndicator \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "showsMenuIndicator", + "Type": { + "Name": "BOOL" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887112-setshowsmenuindicator?language=objc", + "Unavailable": false + }, + { + "Name": "showsMenuIndicatorForSegment:", + "Description": "", + "Declaration": "- (BOOL)showsMenuIndicatorForSegment:(NSInteger)segment;", + "Return": { + "Name": "BOOL" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887111-showsmenuindicatorforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "selectSegmentWithTag:", + "Description": "Selects the segment with the specified tag.", + "Declaration": "- (BOOL)selectSegmentWithTag:(NSInteger)tag;", + "Return": { + "Name": "BOOL" + }, + "Args": [ + { + "Name": "tag", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534016-selectsegmentwithtag?language=objc", + "Unavailable": false + }, + { + "Name": "setSelected:forSegment:", + "Description": "Sets the selection state of the specified segment.", + "Declaration": "- (void)setSelected:(BOOL)selected \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "selected", + "Type": { + "Name": "BOOL" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1528334-setselected?language=objc", + "Unavailable": false + }, + { + "Name": "isSelectedForSegment:", + "Description": "Returns a Boolean value indicating whether the specified segment is selected.", + "Declaration": "- (BOOL)isSelectedForSegment:(NSInteger)segment;", + "Return": { + "Name": "BOOL" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525676-isselectedforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setWidth:forSegment:", + "Description": "Sets the width of the specified segment.", + "Declaration": "- (void)setWidth:(CGFloat)width \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "width", + "Type": { + "Name": "CGFloat" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534487-setwidth?language=objc", + "Unavailable": false + }, + { + "Name": "widthForSegment:", + "Description": "Returns the width of the specified segment.", + "Declaration": "- (CGFloat)widthForSegment:(NSInteger)segment;", + "Return": { + "Name": "CGFloat" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1533866-widthforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "compressWithPrioritizedCompressionOptions:", + "Description": "", + "Declaration": "- (void)compressWithPrioritizedCompressionOptions:(NSArray\u003cNSUserInterfaceCompressionOptions *\u003e *)prioritizedOptions;", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "prioritizedOptions", + "Type": { + "Name": "NSArray", + "IsPtr": true, + "Params": [ + { + "Name": "NSUserInterfaceCompressionOptions", + "IsPtr": true + } + ] + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2952064-compresswithprioritizedcompressi?language=objc", + "Unavailable": false + }, + { + "Name": "minimumSizeWithPrioritizedCompressionOptions:", + "Description": "", + "Declaration": "- (NSSize)minimumSizeWithPrioritizedCompressionOptions:(NSArray\u003cNSUserInterfaceCompressionOptions *\u003e *)prioritizedOptions;", + "Return": { + "Name": "NSSize" + }, + "Args": [ + { + "Name": "prioritizedOptions", + "Type": { + "Name": "NSArray", + "IsPtr": true, + "Params": [ + { + "Name": "NSUserInterfaceCompressionOptions", + "IsPtr": true + } + ] + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2952063-minimumsizewithprioritizedcompre?language=objc", + "Unavailable": false + }, + { + "Name": "setEnabled:forSegment:", + "Description": "Sets the enabled state of the specified segment", + "Declaration": "- (void)setEnabled:(BOOL)enabled \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "enabled", + "Type": { + "Name": "BOOL" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1526417-setenabled?language=objc", + "Unavailable": false + }, + { + "Name": "isEnabledForSegment:", + "Description": "Returns a Boolean value indicating whether the specified segment is enabled.", + "Declaration": "- (BOOL)isEnabledForSegment:(NSInteger)segment;", + "Return": { + "Name": "BOOL" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1524542-isenabledforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "tagForSegment:", + "Description": "", + "Declaration": "- (NSInteger)tagForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSInteger" + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887113-tagforsegment?language=objc", + "Unavailable": false + }, + { + "Name": "setTag:forSegment:", + "Description": "", + "Declaration": "- (void)setTag:(NSInteger)tag \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "tag", + "Type": { + "Name": "NSInteger" + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887104-settag?language=objc", + "Unavailable": false + }, + { + "Name": "setToolTip:forSegment:", + "Description": "", + "Declaration": "- (void)setToolTip:(NSString *)toolTip \n forSegment:(NSInteger)segment;\n", + "Return": { + "Name": "void" + }, + "Args": [ + { + "Name": "toolTip", + "Type": { + "Name": "NSString", + "IsPtr": true + } + }, + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887101-settooltip?language=objc", + "Unavailable": false + }, + { + "Name": "toolTipForSegment:", + "Description": "", + "Declaration": "- (NSString *)toolTipForSegment:(NSInteger)segment;", + "Return": { + "Name": "NSString", + "IsPtr": true + }, + "Args": [ + { + "Name": "segment", + "Type": { + "Name": "NSInteger" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887103-tooltipforsegment?language=objc", + "Unavailable": false + } + ], + "InstanceProperties": [ + { + "Name": "trackingMode", + "Description": "The type of tracking behavior the control exhibits.", + "Declaration": "@property NSSegmentSwitchTracking trackingMode;", + "Type": { + "Name": "NSSegmentSwitchTracking" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1526285-trackingmode?language=objc" + }, + { + "Name": "segmentStyle", + "Description": "The visual style used to display the control.", + "Declaration": "@property NSSegmentStyle segmentStyle;", + "Type": { + "Name": "NSSegmentStyle" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1528507-segmentstyle?language=objc" + }, + { + "Name": "segmentCount", + "Description": "The number of segments in the control.", + "Declaration": "@property NSInteger segmentCount;", + "Type": { + "Name": "NSInteger" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1527451-segmentcount?language=objc" + }, + { + "Name": "springLoaded", + "Description": "A Boolean value that indicates whether spring loading is enabled for the control.", + "Declaration": "@property(getter=isSpringLoaded) BOOL springLoaded;", + "Type": { + "Name": "BOOL" + }, + "Attrs": { + "getter": "isSpringLoaded" + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534122-springloaded?language=objc" + }, + { + "Name": "selectedSegment", + "Description": "The index of the selected segment of the control, or -1 if no segment is selected.", + "Declaration": "@property NSInteger selectedSegment;", + "Type": { + "Name": "NSInteger" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534490-selectedsegment?language=objc" + }, + { + "Name": "indexOfSelectedItem", + "Description": "", + "Declaration": "@property(readonly) NSInteger indexOfSelectedItem;", + "Type": { + "Name": "NSInteger" + }, + "Attrs": { + "readonly": true + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887105-indexofselecteditem?language=objc" + }, + { + "Name": "selectedSegmentBezelColor", + "Description": "The color of the selected segment's bezel, in appearances that support it.", + "Declaration": "@property(copy) NSColor *selectedSegmentBezelColor;", + "Type": { + "Name": "NSColor", + "IsPtr": true + }, + "Attrs": { + "copy": true + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2561002-selectedsegmentbezelcolor?language=objc" + }, + { + "Name": "doubleValueForSelectedSegment", + "Description": "When the tracking mode for the control is set to use a momentary accelerator, returns a value for the selected segment.", + "Declaration": "@property(readonly) double doubleValueForSelectedSegment;", + "Type": { + "Name": "double" + }, + "Attrs": { + "readonly": true + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1529727-doublevalueforselectedsegment?language=objc" + }, + { + "Name": "segmentDistribution", + "Description": "", + "Declaration": "@property NSSegmentDistribution segmentDistribution;", + "Type": { + "Name": "NSSegmentDistribution" + }, + "Attrs": {}, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887109-segmentdistribution?language=objc" + }, + { + "Name": "activeCompressionOptions", + "Description": "", + "Declaration": "@property(readonly, copy) NSUserInterfaceCompressionOptions *activeCompressionOptions;", + "Type": { + "Name": "NSUserInterfaceCompressionOptions", + "IsPtr": true + }, + "Attrs": { + "copy": true, + "readonly": true + }, + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2952062-activecompressionoptions?language=objc" + } + ], + "TypeMethods": [ + { + "Name": "segmentedControlWithImages:trackingMode:target:action:", + "Description": "", + "Declaration": "+ (instancetype)segmentedControlWithImages:(NSArray\u003cNSImage *\u003e *)images \n trackingMode:(NSSegmentSwitchTracking)trackingMode \n target:(id)target \n action:(SEL)action;\n", + "Return": { + "Name": "instancetype" + }, + "Args": [ + { + "Name": "images", + "Type": { + "Name": "NSArray", + "IsPtr": true, + "Params": [ + { + "Name": "NSImage", + "IsPtr": true + } + ] + } + }, + { + "Name": "trackingMode", + "Type": { + "Name": "NSSegmentSwitchTracking" + } + }, + { + "Name": "target", + "Type": { + "Name": "id" + } + }, + { + "Name": "action", + "Type": { + "Name": "SEL" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1644010-segmentedcontrolwithimages?language=objc", + "Unavailable": false + }, + { + "Name": "segmentedControlWithLabels:trackingMode:target:action:", + "Description": "", + "Declaration": "+ (instancetype)segmentedControlWithLabels:(NSArray\u003cNSString *\u003e *)labels \n trackingMode:(NSSegmentSwitchTracking)trackingMode \n target:(id)target \n action:(SEL)action;\n", + "Return": { + "Name": "instancetype" + }, + "Args": [ + { + "Name": "labels", + "Type": { + "Name": "NSArray", + "IsPtr": true, + "Params": [ + { + "Name": "NSString", + "IsPtr": true + } + ] + } + }, + { + "Name": "trackingMode", + "Type": { + "Name": "NSSegmentSwitchTracking" + } + }, + { + "Name": "target", + "Type": { + "Name": "id" + } + }, + { + "Name": "action", + "Type": { + "Name": "SEL" + } + } + ], + "TopicURL": "https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1644011-segmentedcontrolwithlabels?language=objc", + "Unavailable": false + } + ] + }, + "APICollection": null, + "Kind": "class", + "PullDate": "2023-07-22T18:59:29.144459-04:00", + "Version": 2 +} \ No newline at end of file diff --git a/cocoa/NSDatePicker.go b/cocoa/NSDatePicker.go new file mode 100644 index 00000000..3fae66ee --- /dev/null +++ b/cocoa/NSDatePicker.go @@ -0,0 +1,5 @@ +package cocoa + +type NSDatePicker struct { + gen_NSDatePicker +} diff --git a/cocoa/NSProgressIndicator.go b/cocoa/NSProgressIndicator.go new file mode 100644 index 00000000..9153848e --- /dev/null +++ b/cocoa/NSProgressIndicator.go @@ -0,0 +1,5 @@ +package cocoa + +type NSProgressIndicator struct { + gen_NSProgressIndicator +} diff --git a/cocoa/NSSegmentedControl.go b/cocoa/NSSegmentedControl.go new file mode 100644 index 00000000..d4da05a1 --- /dev/null +++ b/cocoa/NSSegmentedControl.go @@ -0,0 +1,5 @@ +package cocoa + +type NSSegmentedControl struct { + gen_NSSegmentedControl +} diff --git a/cocoa/cocoa_objc.gen.go b/cocoa/cocoa_objc.gen.go index dfa8e03e..58e9696f 100755 --- a/cocoa/cocoa_objc.gen.go +++ b/cocoa/cocoa_objc.gen.go @@ -527,6 +527,18 @@ void* NSComboBox_type_Alloc() { return [NSComboBox alloc]; } +void* NSProgressIndicator_type_Alloc() { + return [NSProgressIndicator + alloc]; +} +void* NSDatePicker_type_Alloc() { + return [NSDatePicker + alloc]; +} +void* NSSegmentedControl_type_Alloc() { + return [NSSegmentedControl + alloc]; +} void* NSColor_type_Alloc() { return [NSColor alloc]; @@ -5854,6 +5866,295 @@ void NSComboBox_inst_SetDelegate(void *id, void* value) { setDelegate: value]; } +void NSProgressIndicator_inst_SizeToFit(void *id) { + [(NSProgressIndicator*)id + sizeToFit]; +} + +void NSProgressIndicator_inst_StartAnimation(void *id, void* sender) { + [(NSProgressIndicator*)id + startAnimation: sender]; +} + +void NSProgressIndicator_inst_StopAnimation(void *id, void* sender) { + [(NSProgressIndicator*)id + stopAnimation: sender]; +} + +void* NSProgressIndicator_inst_Init(void *id) { + return [(NSProgressIndicator*)id + init]; +} + +BOOL NSProgressIndicator_inst_UsesThreadedAnimation(void *id) { + return [(NSProgressIndicator*)id + usesThreadedAnimation]; +} + +void NSProgressIndicator_inst_SetUsesThreadedAnimation(void *id, BOOL value) { + [(NSProgressIndicator*)id + setUsesThreadedAnimation: value]; +} + +BOOL NSProgressIndicator_inst_IsIndeterminate(void *id) { + return [(NSProgressIndicator*)id + isIndeterminate]; +} + +void NSProgressIndicator_inst_SetIndeterminate(void *id, BOOL value) { + [(NSProgressIndicator*)id + setIndeterminate: value]; +} + +BOOL NSProgressIndicator_inst_IsDisplayedWhenStopped(void *id) { + return [(NSProgressIndicator*)id + isDisplayedWhenStopped]; +} + +void NSProgressIndicator_inst_SetDisplayedWhenStopped(void *id, BOOL value) { + [(NSProgressIndicator*)id + setDisplayedWhenStopped: value]; +} + +void* NSDatePicker_inst_Init(void *id) { + return [(NSDatePicker*)id + init]; +} + +BOOL NSDatePicker_inst_IsBezeled(void *id) { + return [(NSDatePicker*)id + isBezeled]; +} + +void NSDatePicker_inst_SetBezeled(void *id, BOOL value) { + [(NSDatePicker*)id + setBezeled: value]; +} + +BOOL NSDatePicker_inst_IsBordered(void *id) { + return [(NSDatePicker*)id + isBordered]; +} + +void NSDatePicker_inst_SetBordered(void *id, BOOL value) { + [(NSDatePicker*)id + setBordered: value]; +} + +void* NSDatePicker_inst_BackgroundColor(void *id) { + return [(NSDatePicker*)id + backgroundColor]; +} + +void NSDatePicker_inst_SetBackgroundColor(void *id, void* value) { + [(NSDatePicker*)id + setBackgroundColor: value]; +} + +BOOL NSDatePicker_inst_DrawsBackground(void *id) { + return [(NSDatePicker*)id + drawsBackground]; +} + +void NSDatePicker_inst_SetDrawsBackground(void *id, BOOL value) { + [(NSDatePicker*)id + setDrawsBackground: value]; +} + +void* NSDatePicker_inst_TextColor(void *id) { + return [(NSDatePicker*)id + textColor]; +} + +void NSDatePicker_inst_SetTextColor(void *id, void* value) { + [(NSDatePicker*)id + setTextColor: value]; +} + +BOOL NSDatePicker_inst_PresentsCalendarOverlay(void *id) { + return [(NSDatePicker*)id + presentsCalendarOverlay]; +} + +void NSDatePicker_inst_SetPresentsCalendarOverlay(void *id, BOOL value) { + [(NSDatePicker*)id + setPresentsCalendarOverlay: value]; +} + +void* NSDatePicker_inst_Delegate(void *id) { + return [(NSDatePicker*)id + delegate]; +} + +void NSDatePicker_inst_SetDelegate(void *id, void* value) { + [(NSDatePicker*)id + setDelegate: value]; +} + +void NSSegmentedControl_inst_CompressWithPrioritizedCompressionOptions(void *id, void* prioritizedOptions) { + [(NSSegmentedControl*)id + compressWithPrioritizedCompressionOptions: prioritizedOptions]; +} + +void* NSSegmentedControl_inst_ImageForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + imageForSegment: segment]; +} + +BOOL NSSegmentedControl_inst_IsEnabledForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + isEnabledForSegment: segment]; +} + +BOOL NSSegmentedControl_inst_IsSelectedForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + isSelectedForSegment: segment]; +} + +void* NSSegmentedControl_inst_LabelForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + labelForSegment: segment]; +} + +void* NSSegmentedControl_inst_MenuForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + menuForSegment: segment]; +} + +NSSize NSSegmentedControl_inst_MinimumSizeWithPrioritizedCompressionOptions(void *id, void* prioritizedOptions) { + return [(NSSegmentedControl*)id + minimumSizeWithPrioritizedCompressionOptions: prioritizedOptions]; +} + +BOOL NSSegmentedControl_inst_SelectSegmentWithTag(void *id, long tag) { + return [(NSSegmentedControl*)id + selectSegmentWithTag: tag]; +} + +void NSSegmentedControl_inst_SetEnabledForSegment(void *id, BOOL enabled, long segment) { + [(NSSegmentedControl*)id + setEnabled: enabled + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetImageForSegment(void *id, void* image, long segment) { + [(NSSegmentedControl*)id + setImage: image + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetLabelForSegment(void *id, void* label, long segment) { + [(NSSegmentedControl*)id + setLabel: label + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetMenuForSegment(void *id, void* menu, long segment) { + [(NSSegmentedControl*)id + setMenu: menu + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetSelectedForSegment(void *id, BOOL selected, long segment) { + [(NSSegmentedControl*)id + setSelected: selected + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetShowsMenuIndicatorForSegment(void *id, BOOL showsMenuIndicator, long segment) { + [(NSSegmentedControl*)id + setShowsMenuIndicator: showsMenuIndicator + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetTagForSegment(void *id, long tag, long segment) { + [(NSSegmentedControl*)id + setTag: tag + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetToolTipForSegment(void *id, void* toolTip, long segment) { + [(NSSegmentedControl*)id + setToolTip: toolTip + forSegment: segment]; +} + +void NSSegmentedControl_inst_SetWidthForSegment(void *id, double width, long segment) { + [(NSSegmentedControl*)id + setWidth: width + forSegment: segment]; +} + +BOOL NSSegmentedControl_inst_ShowsMenuIndicatorForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + showsMenuIndicatorForSegment: segment]; +} + +long NSSegmentedControl_inst_TagForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + tagForSegment: segment]; +} + +void* NSSegmentedControl_inst_ToolTipForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + toolTipForSegment: segment]; +} + +double NSSegmentedControl_inst_WidthForSegment(void *id, long segment) { + return [(NSSegmentedControl*)id + widthForSegment: segment]; +} + +void* NSSegmentedControl_inst_Init(void *id) { + return [(NSSegmentedControl*)id + init]; +} + +long NSSegmentedControl_inst_SegmentCount(void *id) { + return [(NSSegmentedControl*)id + segmentCount]; +} + +void NSSegmentedControl_inst_SetSegmentCount(void *id, long value) { + [(NSSegmentedControl*)id + setSegmentCount: value]; +} + +BOOL NSSegmentedControl_inst_IsSpringLoaded(void *id) { + return [(NSSegmentedControl*)id + isSpringLoaded]; +} + +void NSSegmentedControl_inst_SetSpringLoaded(void *id, BOOL value) { + [(NSSegmentedControl*)id + setSpringLoaded: value]; +} + +long NSSegmentedControl_inst_SelectedSegment(void *id) { + return [(NSSegmentedControl*)id + selectedSegment]; +} + +void NSSegmentedControl_inst_SetSelectedSegment(void *id, long value) { + [(NSSegmentedControl*)id + setSelectedSegment: value]; +} + +long NSSegmentedControl_inst_IndexOfSelectedItem(void *id) { + return [(NSSegmentedControl*)id + indexOfSelectedItem]; +} + +void* NSSegmentedControl_inst_SelectedSegmentBezelColor(void *id) { + return [(NSSegmentedControl*)id + selectedSegmentBezelColor]; +} + +void NSSegmentedControl_inst_SetSelectedSegmentBezelColor(void *id, void* value) { + [(NSSegmentedControl*)id + setSelectedSegmentBezelColor: value]; +} + void* NSColor_inst_BlendedColorWithFractionOfColor(void *id, double fraction, void* color) { return [(NSColor*)id blendedColorWithFraction: fraction @@ -9038,6 +9339,27 @@ func NSComboBox_Alloc() NSComboBox { return NSComboBox_FromPointer(ret) } +// NSProgressIndicator_Alloc is undocumented. +func NSProgressIndicator_Alloc() NSProgressIndicator { + ret := C.NSProgressIndicator_type_Alloc() + + return NSProgressIndicator_FromPointer(ret) +} + +// NSDatePicker_Alloc is undocumented. +func NSDatePicker_Alloc() NSDatePicker { + ret := C.NSDatePicker_type_Alloc() + + return NSDatePicker_FromPointer(ret) +} + +// NSSegmentedControl_Alloc is undocumented. +func NSSegmentedControl_Alloc() NSSegmentedControl { + ret := C.NSSegmentedControl_type_Alloc() + + return NSSegmentedControl_FromPointer(ret) +} + // NSColor_Alloc is undocumented. func NSColor_Alloc() NSColor { ret := C.NSColor_type_Alloc() @@ -23022,6 +23344,829 @@ func (x gen_NSComboBox) SetDelegate( return } +type NSProgressIndicatorRef interface { + Pointer() uintptr + Init_AsNSProgressIndicator() NSProgressIndicator +} + +type gen_NSProgressIndicator struct { + NSView +} + +func NSProgressIndicator_FromPointer(ptr unsafe.Pointer) NSProgressIndicator { + return NSProgressIndicator{gen_NSProgressIndicator{ + NSView_FromPointer(ptr), + }} +} + +func NSProgressIndicator_FromRef(ref objc.Ref) NSProgressIndicator { + return NSProgressIndicator_FromPointer(unsafe.Pointer(ref.Pointer())) +} + +// SizeToFit this action method resizes the progress indicator to an appropriate size depending on the value of style. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501144-sizetofit?language=objc for details. +func (x gen_NSProgressIndicator) SizeToFit() { + C.NSProgressIndicator_inst_SizeToFit( + unsafe.Pointer(x.Pointer()), + ) + + return +} + +// StartAnimation starts the animation of an indeterminate progress indicator. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501167-startanimation?language=objc for details. +func (x gen_NSProgressIndicator) StartAnimation( + sender objc.Ref, +) { + C.NSProgressIndicator_inst_StartAnimation( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(sender), + ) + + return +} + +// StopAnimation stops the animation of an indeterminate progress indicator. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501141-stopanimation?language=objc for details. +func (x gen_NSProgressIndicator) StopAnimation( + sender objc.Ref, +) { + C.NSProgressIndicator_inst_StopAnimation( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(sender), + ) + + return +} + +// Init initializes a new instance of the NSProgressIndicator class. +func (x gen_NSProgressIndicator) Init() NSProgressIndicator { + ret := C.NSProgressIndicator_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSProgressIndicator_FromPointer(ret) +} + +// Init_AsNSProgressIndicator is a typed version of Init. +func (x gen_NSProgressIndicator) Init_AsNSProgressIndicator() NSProgressIndicator { + ret := C.NSProgressIndicator_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSProgressIndicator_FromPointer(ret) +} + +// UsesThreadedAnimation returns a Boolean that indicates whether the progress indicator implements animation in a separate thread. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501160-usesthreadedanimation?language=objc for details. +func (x gen_NSProgressIndicator) UsesThreadedAnimation() bool { + ret := C.NSProgressIndicator_inst_UsesThreadedAnimation( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetUsesThreadedAnimation returns a Boolean that indicates whether the progress indicator implements animation in a separate thread. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501160-usesthreadedanimation?language=objc for details. +func (x gen_NSProgressIndicator) SetUsesThreadedAnimation( + value bool, +) { + C.NSProgressIndicator_inst_SetUsesThreadedAnimation( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// IsIndeterminate returns a Boolean that indicates whether the progress indicator is indeterminate. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501146-indeterminate?language=objc for details. +func (x gen_NSProgressIndicator) IsIndeterminate() bool { + ret := C.NSProgressIndicator_inst_IsIndeterminate( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetIndeterminate returns a Boolean that indicates whether the progress indicator is indeterminate. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501146-indeterminate?language=objc for details. +func (x gen_NSProgressIndicator) SetIndeterminate( + value bool, +) { + C.NSProgressIndicator_inst_SetIndeterminate( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// IsDisplayedWhenStopped returns a Boolean that indicates whether the progress indicator hides itself when it isn’t animating. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501171-displayedwhenstopped?language=objc for details. +func (x gen_NSProgressIndicator) IsDisplayedWhenStopped() bool { + ret := C.NSProgressIndicator_inst_IsDisplayedWhenStopped( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetDisplayedWhenStopped returns a Boolean that indicates whether the progress indicator hides itself when it isn’t animating. +// +// See https://developer.apple.com/documentation/appkit/nsprogressindicator/1501171-displayedwhenstopped?language=objc for details. +func (x gen_NSProgressIndicator) SetDisplayedWhenStopped( + value bool, +) { + C.NSProgressIndicator_inst_SetDisplayedWhenStopped( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +type NSDatePickerRef interface { + Pointer() uintptr + Init_AsNSDatePicker() NSDatePicker +} + +type gen_NSDatePicker struct { + NSControl +} + +func NSDatePicker_FromPointer(ptr unsafe.Pointer) NSDatePicker { + return NSDatePicker{gen_NSDatePicker{ + NSControl_FromPointer(ptr), + }} +} + +func NSDatePicker_FromRef(ref objc.Ref) NSDatePicker { + return NSDatePicker_FromPointer(unsafe.Pointer(ref.Pointer())) +} + +// Init initializes a new instance of the NSDatePicker class. +func (x gen_NSDatePicker) Init() NSDatePicker { + ret := C.NSDatePicker_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSDatePicker_FromPointer(ret) +} + +// Init_AsNSDatePicker is a typed version of Init. +func (x gen_NSDatePicker) Init_AsNSDatePicker() NSDatePicker { + ret := C.NSDatePicker_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSDatePicker_FromPointer(ret) +} + +// IsBezeled returns a Boolean value that indicates whether the date picker draws a bezeled border. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1533534-bezeled?language=objc for details. +func (x gen_NSDatePicker) IsBezeled() bool { + ret := C.NSDatePicker_inst_IsBezeled( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetBezeled returns a Boolean value that indicates whether the date picker draws a bezeled border. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1533534-bezeled?language=objc for details. +func (x gen_NSDatePicker) SetBezeled( + value bool, +) { + C.NSDatePicker_inst_SetBezeled( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// IsBordered returns a Boolean value that indicates whether the date picker has a plain border. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1534176-bordered?language=objc for details. +func (x gen_NSDatePicker) IsBordered() bool { + ret := C.NSDatePicker_inst_IsBordered( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetBordered returns a Boolean value that indicates whether the date picker has a plain border. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1534176-bordered?language=objc for details. +func (x gen_NSDatePicker) SetBordered( + value bool, +) { + C.NSDatePicker_inst_SetBordered( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// BackgroundColor returns the date picker’s background color. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1527710-backgroundcolor?language=objc for details. +func (x gen_NSDatePicker) BackgroundColor() NSColor { + ret := C.NSDatePicker_inst_BackgroundColor( + unsafe.Pointer(x.Pointer()), + ) + + return NSColor_FromPointer(ret) +} + +// SetBackgroundColor returns the date picker’s background color. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1527710-backgroundcolor?language=objc for details. +func (x gen_NSDatePicker) SetBackgroundColor( + value NSColorRef, +) { + C.NSDatePicker_inst_SetBackgroundColor( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(value), + ) + + return +} + +// DrawsBackground returns a Boolean value that indicates whether the date picker draws the background. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1528266-drawsbackground?language=objc for details. +func (x gen_NSDatePicker) DrawsBackground() bool { + ret := C.NSDatePicker_inst_DrawsBackground( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetDrawsBackground returns a Boolean value that indicates whether the date picker draws the background. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1528266-drawsbackground?language=objc for details. +func (x gen_NSDatePicker) SetDrawsBackground( + value bool, +) { + C.NSDatePicker_inst_SetDrawsBackground( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// TextColor returns the date picker’s text color. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1534294-textcolor?language=objc for details. +func (x gen_NSDatePicker) TextColor() NSColor { + ret := C.NSDatePicker_inst_TextColor( + unsafe.Pointer(x.Pointer()), + ) + + return NSColor_FromPointer(ret) +} + +// SetTextColor returns the date picker’s text color. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1534294-textcolor?language=objc for details. +func (x gen_NSDatePicker) SetTextColor( + value NSColorRef, +) { + C.NSDatePicker_inst_SetTextColor( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(value), + ) + + return +} + +// PresentsCalendarOverlay returns a Boolean value that indicates whether to present a graphical calendar overlay when editing a calendar element within a text-field style date picker. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/3521157-presentscalendaroverlay?language=objc for details. +func (x gen_NSDatePicker) PresentsCalendarOverlay() bool { + ret := C.NSDatePicker_inst_PresentsCalendarOverlay( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetPresentsCalendarOverlay returns a Boolean value that indicates whether to present a graphical calendar overlay when editing a calendar element within a text-field style date picker. +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/3521157-presentscalendaroverlay?language=objc for details. +func (x gen_NSDatePicker) SetPresentsCalendarOverlay( + value bool, +) { + C.NSDatePicker_inst_SetPresentsCalendarOverlay( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// Delegate returns a delegate for the date picker’s cell +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1533878-delegate?language=objc for details. +func (x gen_NSDatePicker) Delegate() objc.Object { + ret := C.NSDatePicker_inst_Delegate( + unsafe.Pointer(x.Pointer()), + ) + + return objc.Object_FromPointer(ret) +} + +// SetDelegate returns a delegate for the date picker’s cell +// +// See https://developer.apple.com/documentation/appkit/nsdatepicker/1533878-delegate?language=objc for details. +func (x gen_NSDatePicker) SetDelegate( + value objc.Ref, +) { + C.NSDatePicker_inst_SetDelegate( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(value), + ) + + return +} + +type NSSegmentedControlRef interface { + Pointer() uintptr + Init_AsNSSegmentedControl() NSSegmentedControl +} + +type gen_NSSegmentedControl struct { + NSControl +} + +func NSSegmentedControl_FromPointer(ptr unsafe.Pointer) NSSegmentedControl { + return NSSegmentedControl{gen_NSSegmentedControl{ + NSControl_FromPointer(ptr), + }} +} + +func NSSegmentedControl_FromRef(ref objc.Ref) NSSegmentedControl { + return NSSegmentedControl_FromPointer(unsafe.Pointer(ref.Pointer())) +} + +// CompressWithPrioritizedCompressionOptions is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2952064-compresswithprioritizedcompressi?language=objc for details. +func (x gen_NSSegmentedControl) CompressWithPrioritizedCompressionOptions( + prioritizedOptions core.NSArrayRef, +) { + C.NSSegmentedControl_inst_CompressWithPrioritizedCompressionOptions( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(prioritizedOptions), + ) + + return +} + +// ImageForSegment returns the image associated with the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1527623-imageforsegment?language=objc for details. +func (x gen_NSSegmentedControl) ImageForSegment( + segment core.NSInteger, +) NSImage { + ret := C.NSSegmentedControl_inst_ImageForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return NSImage_FromPointer(ret) +} + +// IsEnabledForSegment returns a Boolean value indicating whether the specified segment is enabled. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1524542-isenabledforsegment?language=objc for details. +func (x gen_NSSegmentedControl) IsEnabledForSegment( + segment core.NSInteger, +) bool { + ret := C.NSSegmentedControl_inst_IsEnabledForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return convertObjCBoolToGo(ret) +} + +// IsSelectedForSegment returns a Boolean value indicating whether the specified segment is selected. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525676-isselectedforsegment?language=objc for details. +func (x gen_NSSegmentedControl) IsSelectedForSegment( + segment core.NSInteger, +) bool { + ret := C.NSSegmentedControl_inst_IsSelectedForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return convertObjCBoolToGo(ret) +} + +// LabelForSegment returns the label of the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1524322-labelforsegment?language=objc for details. +func (x gen_NSSegmentedControl) LabelForSegment( + segment core.NSInteger, +) string { + ret := C.NSSegmentedControl_inst_LabelForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return C.GoString(C.createCStringFromNSString(ret)) +} + +// MenuForSegment returns the menu for the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525880-menuforsegment?language=objc for details. +func (x gen_NSSegmentedControl) MenuForSegment( + segment core.NSInteger, +) NSMenu { + ret := C.NSSegmentedControl_inst_MenuForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return NSMenu_FromPointer(ret) +} + +// MinimumSizeWithPrioritizedCompressionOptions is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2952063-minimumsizewithprioritizedcompre?language=objc for details. +func (x gen_NSSegmentedControl) MinimumSizeWithPrioritizedCompressionOptions( + prioritizedOptions core.NSArrayRef, +) core.NSSize { + ret := C.NSSegmentedControl_inst_MinimumSizeWithPrioritizedCompressionOptions( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(prioritizedOptions), + ) + + return *(*core.NSSize)(unsafe.Pointer(&ret)) +} + +// SelectSegmentWithTag selects the segment with the specified tag. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534016-selectsegmentwithtag?language=objc for details. +func (x gen_NSSegmentedControl) SelectSegmentWithTag( + tag core.NSInteger, +) bool { + ret := C.NSSegmentedControl_inst_SelectSegmentWithTag( + unsafe.Pointer(x.Pointer()), + C.long(tag), + ) + + return convertObjCBoolToGo(ret) +} + +// SetEnabledForSegment sets the enabled state of the specified segment +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1526417-setenabled?language=objc for details. +func (x gen_NSSegmentedControl) SetEnabledForSegment( + enabled bool, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetEnabledForSegment( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(enabled), + C.long(segment), + ) + + return +} + +// SetImageForSegment sets the image for the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1525540-setimage?language=objc for details. +func (x gen_NSSegmentedControl) SetImageForSegment( + image NSImageRef, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetImageForSegment( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(image), + C.long(segment), + ) + + return +} + +// SetLabelForSegment sets the label for the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1533073-setlabel?language=objc for details. +func (x gen_NSSegmentedControl) SetLabelForSegment( + label string, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetLabelForSegment( + unsafe.Pointer(x.Pointer()), + C.createNSStringFromCString(C.CString(label)), + C.long(segment), + ) + + return +} + +// SetMenuForSegment sets the menu for the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1528853-setmenu?language=objc for details. +func (x gen_NSSegmentedControl) SetMenuForSegment( + menu NSMenuRef, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetMenuForSegment( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(menu), + C.long(segment), + ) + + return +} + +// SetSelectedForSegment sets the selection state of the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1528334-setselected?language=objc for details. +func (x gen_NSSegmentedControl) SetSelectedForSegment( + selected bool, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetSelectedForSegment( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(selected), + C.long(segment), + ) + + return +} + +// SetShowsMenuIndicatorForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887112-setshowsmenuindicator?language=objc for details. +func (x gen_NSSegmentedControl) SetShowsMenuIndicatorForSegment( + showsMenuIndicator bool, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetShowsMenuIndicatorForSegment( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(showsMenuIndicator), + C.long(segment), + ) + + return +} + +// SetTagForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887104-settag?language=objc for details. +func (x gen_NSSegmentedControl) SetTagForSegment( + tag core.NSInteger, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetTagForSegment( + unsafe.Pointer(x.Pointer()), + C.long(tag), + C.long(segment), + ) + + return +} + +// SetToolTipForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887101-settooltip?language=objc for details. +func (x gen_NSSegmentedControl) SetToolTipForSegment( + toolTip string, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetToolTipForSegment( + unsafe.Pointer(x.Pointer()), + C.createNSStringFromCString(C.CString(toolTip)), + C.long(segment), + ) + + return +} + +// SetWidthForSegment sets the width of the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534487-setwidth?language=objc for details. +func (x gen_NSSegmentedControl) SetWidthForSegment( + width core.CGFloat, + segment core.NSInteger, +) { + C.NSSegmentedControl_inst_SetWidthForSegment( + unsafe.Pointer(x.Pointer()), + C.double(width), + C.long(segment), + ) + + return +} + +// ShowsMenuIndicatorForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887111-showsmenuindicatorforsegment?language=objc for details. +func (x gen_NSSegmentedControl) ShowsMenuIndicatorForSegment( + segment core.NSInteger, +) bool { + ret := C.NSSegmentedControl_inst_ShowsMenuIndicatorForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return convertObjCBoolToGo(ret) +} + +// TagForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887113-tagforsegment?language=objc for details. +func (x gen_NSSegmentedControl) TagForSegment( + segment core.NSInteger, +) core.NSInteger { + ret := C.NSSegmentedControl_inst_TagForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return core.NSInteger(ret) +} + +// ToolTipForSegment is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887103-tooltipforsegment?language=objc for details. +func (x gen_NSSegmentedControl) ToolTipForSegment( + segment core.NSInteger, +) string { + ret := C.NSSegmentedControl_inst_ToolTipForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return C.GoString(C.createCStringFromNSString(ret)) +} + +// WidthForSegment returns the width of the specified segment. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1533866-widthforsegment?language=objc for details. +func (x gen_NSSegmentedControl) WidthForSegment( + segment core.NSInteger, +) core.CGFloat { + ret := C.NSSegmentedControl_inst_WidthForSegment( + unsafe.Pointer(x.Pointer()), + C.long(segment), + ) + + return core.CGFloat(ret) +} + +// Init initializes a new instance of the NSSegmentedControl class. +func (x gen_NSSegmentedControl) Init() NSSegmentedControl { + ret := C.NSSegmentedControl_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSSegmentedControl_FromPointer(ret) +} + +// Init_AsNSSegmentedControl is a typed version of Init. +func (x gen_NSSegmentedControl) Init_AsNSSegmentedControl() NSSegmentedControl { + ret := C.NSSegmentedControl_inst_Init( + unsafe.Pointer(x.Pointer()), + ) + + return NSSegmentedControl_FromPointer(ret) +} + +// SegmentCount returns the number of segments in the control. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1527451-segmentcount?language=objc for details. +func (x gen_NSSegmentedControl) SegmentCount() core.NSInteger { + ret := C.NSSegmentedControl_inst_SegmentCount( + unsafe.Pointer(x.Pointer()), + ) + + return core.NSInteger(ret) +} + +// SetSegmentCount returns the number of segments in the control. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1527451-segmentcount?language=objc for details. +func (x gen_NSSegmentedControl) SetSegmentCount( + value core.NSInteger, +) { + C.NSSegmentedControl_inst_SetSegmentCount( + unsafe.Pointer(x.Pointer()), + C.long(value), + ) + + return +} + +// IsSpringLoaded returns a Boolean value that indicates whether spring loading is enabled for the control. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534122-springloaded?language=objc for details. +func (x gen_NSSegmentedControl) IsSpringLoaded() bool { + ret := C.NSSegmentedControl_inst_IsSpringLoaded( + unsafe.Pointer(x.Pointer()), + ) + + return convertObjCBoolToGo(ret) +} + +// SetSpringLoaded returns a Boolean value that indicates whether spring loading is enabled for the control. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534122-springloaded?language=objc for details. +func (x gen_NSSegmentedControl) SetSpringLoaded( + value bool, +) { + C.NSSegmentedControl_inst_SetSpringLoaded( + unsafe.Pointer(x.Pointer()), + convertToObjCBool(value), + ) + + return +} + +// SelectedSegment returns the index of the selected segment of the control, or -1 if no segment is selected. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534490-selectedsegment?language=objc for details. +func (x gen_NSSegmentedControl) SelectedSegment() core.NSInteger { + ret := C.NSSegmentedControl_inst_SelectedSegment( + unsafe.Pointer(x.Pointer()), + ) + + return core.NSInteger(ret) +} + +// SetSelectedSegment returns the index of the selected segment of the control, or -1 if no segment is selected. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/1534490-selectedsegment?language=objc for details. +func (x gen_NSSegmentedControl) SetSelectedSegment( + value core.NSInteger, +) { + C.NSSegmentedControl_inst_SetSelectedSegment( + unsafe.Pointer(x.Pointer()), + C.long(value), + ) + + return +} + +// IndexOfSelectedItem is undocumented. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2887105-indexofselecteditem?language=objc for details. +func (x gen_NSSegmentedControl) IndexOfSelectedItem() core.NSInteger { + ret := C.NSSegmentedControl_inst_IndexOfSelectedItem( + unsafe.Pointer(x.Pointer()), + ) + + return core.NSInteger(ret) +} + +// SelectedSegmentBezelColor returns the color of the selected segment's bezel, in appearances that support it. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2561002-selectedsegmentbezelcolor?language=objc for details. +func (x gen_NSSegmentedControl) SelectedSegmentBezelColor() NSColor { + ret := C.NSSegmentedControl_inst_SelectedSegmentBezelColor( + unsafe.Pointer(x.Pointer()), + ) + + return NSColor_FromPointer(ret) +} + +// SetSelectedSegmentBezelColor returns the color of the selected segment's bezel, in appearances that support it. +// +// See https://developer.apple.com/documentation/appkit/nssegmentedcontrol/2561002-selectedsegmentbezelcolor?language=objc for details. +func (x gen_NSSegmentedControl) SetSelectedSegmentBezelColor( + value NSColorRef, +) { + C.NSSegmentedControl_inst_SetSelectedSegmentBezelColor( + unsafe.Pointer(x.Pointer()), + objc.RefPointer(value), + ) + + return +} + type NSColorRef interface { Pointer() uintptr Init_AsNSColor() NSColor diff --git a/gen/cmd/gen.go b/gen/cmd/gen.go index 0f43d142..a494ce37 100644 --- a/gen/cmd/gen.go +++ b/gen/cmd/gen.go @@ -86,6 +86,9 @@ func main() { loadFile("api/appkit/nsslider.objc.json"), loadFile("api/appkit/nsopenpanel.objc.json"), loadFile("api/appkit/nscombobox.objc.json"), + loadFile("api/appkit/nsprogressindicator.objc.json"), + loadFile("api/appkit/nsdatepicker.objc.json"), + loadFile("api/appkit/nssegmentedcontrol.objc.json"), loadFile("api/appkit/nscolor.objc.json").Then(func(s *schema.Schema) error { s.Class.TypeMethods = append(s.Class.TypeMethods, schema.Method{