Skip to content

Commit

Permalink
Hide private from code completion
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Feb 7, 2024
1 parent 2b29918 commit 76918f8
Show file tree
Hide file tree
Showing 38 changed files with 329 additions and 325 deletions.
10 changes: 5 additions & 5 deletions src/starling/animation/DelayedCall.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import starling.events.EventDispatcher;
*/
class DelayedCall extends EventDispatcher implements IAnimatable
{
private var __currentTime:Float;
private var __totalTime:Float;
@:allow(starling) private var __callback:Function;
private var __args:Array<Dynamic>;
private var __repeatCount:Int;
@:noCompletion private var __currentTime:Float;
@:noCompletion private var __totalTime:Float;
@:allow(starling) @:noCompletion private var __callback:Function;
@:noCompletion private var __args:Array<Dynamic>;
@:noCompletion private var __repeatCount:Int;

#if commonjs
private static function __init__ () {
Expand Down
8 changes: 4 additions & 4 deletions src/starling/animation/Juggler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ import starling.events.EventDispatcher;
*/
class Juggler implements IAnimatable
{
private var __objects:Vector<IAnimatable>;
private var __objectIDs:Map<IAnimatable, UInt>;
private var __elapsedTime:Float;
private var __timeScale:Float;
@:noCompletion private var __objects:Vector<IAnimatable>;
@:noCompletion private var __objectIDs:Map<IAnimatable, UInt>;
@:noCompletion private var __elapsedTime:Float;
@:noCompletion private var __timeScale:Float;

private static var sCurrentObjectID:UInt = 0;
private static var sTweenInstanceFields:Array<String>;
Expand Down
56 changes: 28 additions & 28 deletions src/starling/animation/Tween.hx
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,35 @@ import starling.utils.Color;
{
private static inline var HINT_MARKER:String = '#';

private var __target:Dynamic;
private var __transitionFunc:Float->Float;
private var __transitionName:String;

private var __properties:Vector<String>;
private var __startValues:Vector<Float>;
private var __endValues:Vector<Float>;
private var __updateFuncs:Vector<String->Float->Float->Void>;
@:noCompletion private var __target:Dynamic;
@:noCompletion private var __transitionFunc:Float->Float;
@:noCompletion private var __transitionName:String;

@:noCompletion private var __properties:Vector<String>;
@:noCompletion private var __startValues:Vector<Float>;
@:noCompletion private var __endValues:Vector<Float>;
@:noCompletion private var __updateFuncs:Vector<String->Float->Float->Void>;

private var __onStart:Function;
private var __onUpdate:Function;
private var __onRepeat:Function;
private var __onComplete:Function;

private var __onStartArgs:Array<Dynamic>;
private var __onUpdateArgs:Array<Dynamic>;
private var __onRepeatArgs:Array<Dynamic>;
private var __onCompleteArgs:Array<Dynamic>;

private var __totalTime:Float;
private var __currentTime:Float;
private var __progress:Float;
private var __delay:Float;
private var __roundToInt:Bool;
private var __nextTween:Tween;
private var __repeatCount:Int;
private var __repeatDelay:Float;
private var __reverse:Bool;
private var __currentCycle:Int;
@:noCompletion private var __onStart:Function;
@:noCompletion private var __onUpdate:Function;
@:noCompletion private var __onRepeat:Function;
@:noCompletion private var __onComplete:Function;

@:noCompletion private var __onStartArgs:Array<Dynamic>;
@:noCompletion private var __onUpdateArgs:Array<Dynamic>;
@:noCompletion private var __onRepeatArgs:Array<Dynamic>;
@:noCompletion private var __onCompleteArgs:Array<Dynamic>;

@:noCompletion private var __totalTime:Float;
@:noCompletion private var __currentTime:Float;
@:noCompletion private var __progress:Float;
@:noCompletion private var __delay:Float;
@:noCompletion private var __roundToInt:Bool;
@:noCompletion private var __nextTween:Tween;
@:noCompletion private var __repeatCount:Int;
@:noCompletion private var __repeatDelay:Float;
@:noCompletion private var __reverse:Bool;
@:noCompletion private var __currentCycle:Int;

#if commonjs
private static function __init__ () {
Expand Down
56 changes: 28 additions & 28 deletions src/starling/core/Starling.hx
Original file line number Diff line number Diff line change
Expand Up @@ -219,35 +219,35 @@ class Starling extends EventDispatcher

// members

private var __stage:Stage; // starling.display.stage!
private var __rootClass:Class<Dynamic>;
private var __root:DisplayObject;
private var __juggler:Juggler;
private var __painter:Painter;
private var __touchProcessor:TouchProcessor;
private var __antiAliasing:Int;
private var __frameTimestamp:Float;
private var __frameID:UInt;
private var __leftMouseDown:Bool;
private var __statsDisplay:StatsDisplay;
private var __statsDisplayAlign:openfl.utils.Object;
private var __started:Bool;
private var __rendering:Bool;
private var __supportHighResolutions:Bool;
private var __supportBrowserZoom:Bool;
private var __skipUnchangedFrames:Bool;
private var __showStats:Bool;
private var __supportsCursor:Bool;
private var __multitouchEnabled:Bool;
@:noCompletion private var __stage:Stage; // starling.display.stage!
@:noCompletion private var __rootClass:Class<Dynamic>;
@:noCompletion private var __root:DisplayObject;
@:noCompletion private var __juggler:Juggler;
@:noCompletion private var __painter:Painter;
@:noCompletion private var __touchProcessor:TouchProcessor;
@:noCompletion private var __antiAliasing:Int;
@:noCompletion private var __frameTimestamp:Float;
@:noCompletion private var __frameID:UInt;
@:noCompletion private var __leftMouseDown:Bool;
@:noCompletion private var __statsDisplay:StatsDisplay;
@:noCompletion private var __statsDisplayAlign:openfl.utils.Object;
@:noCompletion private var __started:Bool;
@:noCompletion private var __rendering:Bool;
@:noCompletion private var __supportHighResolutions:Bool;
@:noCompletion private var __supportBrowserZoom:Bool;
@:noCompletion private var __skipUnchangedFrames:Bool;
@:noCompletion private var __showStats:Bool;
@:noCompletion private var __supportsCursor:Bool;
@:noCompletion private var __multitouchEnabled:Bool;

private var __viewPort:Rectangle;
private var __previousViewPort:Rectangle;
private var __clippedViewPort:Rectangle;

private var __nativeStage:OpenFLStage;
private var __nativeStageEmpty:Bool;
private var __nativeOverlay:Sprite;
private var __nativeOverlayBlocksTouches:Bool;
@:noCompletion private var __viewPort:Rectangle;
@:noCompletion private var __previousViewPort:Rectangle;
@:noCompletion private var __clippedViewPort:Rectangle;

@:noCompletion private var __nativeStage:OpenFLStage;
@:noCompletion private var __nativeStageEmpty:Bool;
@:noCompletion private var __nativeOverlay:Sprite;
@:noCompletion private var __nativeOverlayBlocksTouches:Bool;

private static var sCurrent:Starling;
private static var sAll:Vector<Starling> = new Vector<Starling>();
Expand Down
22 changes: 11 additions & 11 deletions src/starling/core/StatsDisplay.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ class StatsDisplay extends Sprite
private static inline var UPDATE_INTERVAL:Float = 0.5;
private static inline var B_TO_MB:Float = 1.0 / (1024 * 1024); // convert from bytes to MB

private var __background:Quad;
private var __labels:TextField;
private var __values:TextField;
@:noCompletion private var __background:Quad;
@:noCompletion private var __labels:TextField;
@:noCompletion private var __values:TextField;

private var __frameCount:Int = 0;
private var __totalTime:Float = 0;
@:noCompletion private var __frameCount:Int = 0;
@:noCompletion private var __totalTime:Float = 0;

private var __fps:Float = 0;
private var __memory:Float = 0;
private var __gpuMemory:Float = 0;
private var __drawCount:Int = 0;
private var __skipCount:Int = 0;
private var __showSkipped:Bool = false;
@:noCompletion private var __fps:Float = 0;
@:noCompletion private var __memory:Float = 0;
@:noCompletion private var __gpuMemory:Float = 0;
@:noCompletion private var __drawCount:Int = 0;
@:noCompletion private var __skipCount:Int = 0;
@:noCompletion private var __showSkipped:Bool = false;

#if commonjs
private static function __init__ () {
Expand Down
6 changes: 3 additions & 3 deletions src/starling/display/BlendMode.hx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import starling.core.Starling;
*/
class BlendMode
{
private var __name:String;
private var __sourceFactor:Context3DBlendFactor;
private var __destinationFactor:Context3DBlendFactor;
@:noCompletion private var __name:String;
@:noCompletion private var __sourceFactor:Context3DBlendFactor;
@:noCompletion private var __destinationFactor:Context3DBlendFactor;

private static var sBlendModes:Map<String, BlendMode>;

Expand Down
34 changes: 17 additions & 17 deletions src/starling/display/Button.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ import starling.textures.Texture;
*/
class Button extends DisplayObjectContainer
{
private var __upState:Texture;
private var __downState:Texture;
private var __overState:Texture;
private var __disabledState:Texture;
@:noCompletion private var __upState:Texture;
@:noCompletion private var __downState:Texture;
@:noCompletion private var __overState:Texture;
@:noCompletion private var __disabledState:Texture;

private var __contents:Sprite;
private var __body:Image;
private var __textField:TextField;
private var __textBounds:Rectangle;
private var __overlay:Sprite;
@:noCompletion private var __contents:Sprite;
@:noCompletion private var __body:Image;
@:noCompletion private var __textField:TextField;
@:noCompletion private var __textBounds:Rectangle;
@:noCompletion private var __overlay:Sprite;

private var __behavior:ButtonBehavior;
private var __scaleWhenDown:Float;
private var __scaleWhenOver:Float;
private var __alphaWhenDown:Float;
private var __alphaWhenDisabled:Float;
@:noCompletion private var __behavior:ButtonBehavior;
@:noCompletion private var __scaleWhenDown:Float;
@:noCompletion private var __scaleWhenOver:Float;
@:noCompletion private var __alphaWhenDown:Float;
@:noCompletion private var __alphaWhenDisabled:Float;

#if commonjs
private static function __init__ () {
Expand Down Expand Up @@ -188,7 +188,7 @@ class Button extends DisplayObjectContainer
if (__textField != null) __createTextField();
}

private function __createTextField():Void
@:noCompletion private function __createTextField():Void
{
if (__textField == null)
{
Expand All @@ -211,14 +211,14 @@ class Button extends DisplayObjectContainer
private function get_state():String { return __behavior.state; }
private function set_state(value:String):String { return __behavior.state = value; }

private function __setContentScale(scale:Float):Void
@:noCompletion private function __setContentScale(scale:Float):Void
{
__contents.scaleX = __contents.scaleY = scale;
__contents.x = (1.0 - scale) / 2.0 * __body.width;
__contents.y = (1.0 - scale) / 2.0 * __body.height;
}

private function __setStateTexture(texture:Texture):Void
@:noCompletion private function __setStateTexture(texture:Texture):Void
{
__body.texture = texture != null ? texture : __upState;

Expand Down
8 changes: 4 additions & 4 deletions src/starling/display/Canvas.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import starling.rendering.VertexData;
*/
class Canvas extends DisplayObjectContainer
{
private var __polygons:Vector<Polygon>;
private var __fillColor:UInt;
private var __fillAlpha:Float;
@:noCompletion private var __polygons:Vector<Polygon>;
@:noCompletion private var __fillColor:UInt;
@:noCompletion private var __fillAlpha:Float;

/** Creates a new (empty) Canvas. Call one or more of the 'draw' methods to add content. */
public function new()
Expand Down Expand Up @@ -123,7 +123,7 @@ class Canvas extends DisplayObjectContainer
__polygons.length = 0;
}

private function __appendPolygon(polygon:Polygon):Void
@:noCompletion private function __appendPolygon(polygon:Polygon):Void
{
var vertexData:VertexData = new VertexData();
var indexData:IndexData = new IndexData(polygon.numTriangles * 3);
Expand Down
Loading

0 comments on commit 76918f8

Please sign in to comment.