diff --git a/ChangeLog b/ChangeLog index 376af2d01..f021828e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-04-02 Adam Fedor + + * Source/NSGraphicsContext.m (-GSDefineGState): Document new + definition of method. + * Source/NSWindow.m ([NSWindow -_initBackendWindow:]): Change to + match new def. + * Source/NSView.m ([NSView -lockFocusInRect:]): Idem. + 2002-04-02 Pierre-Yves Rivaille * Source/NSTableView.m ([NSTableView -scrollRowToVisible:]): diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 20dca465e..0f63f7c74 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -185,6 +185,7 @@ Gui_AGSDOC_FLAGS = \ }' -Up Gui AUTOGSDOC_HEADERS = \ +GSDisplayServer.h \ GSTable.h \ GSHbox.h \ GSVbox.h \ @@ -297,7 +298,6 @@ AppKitExceptions.h \ DPSOperators.h \ GMAppKit.h \ GMArchiver.h \ -GSDisplayServer.h \ GSFontInfo.h \ GSMemoryPanel.h \ GSInfoPanel.h \ diff --git a/Source/NSGraphicsContext.m b/Source/NSGraphicsContext.m index 3c68a7f71..69104ce6e 100644 --- a/Source/NSGraphicsContext.m +++ b/Source/NSGraphicsContext.m @@ -876,21 +876,30 @@ NSGraphicsContext *GSCurrentContext() /* Gstate Handling */ /* ----------------------------------------------------------------------- */ +/** Depcreciated. Same as -GSReplaceGState: */ - (void) DPScurrentgstate: (int)gst { [self subclassResponsibility: _cmd]; } +/** Pops a previously saved gstate from the gstate stack and makes it + current. Drawing information in the previously saved gstate + becomes the current information */ - (void) DPSgrestore { [self subclassResponsibility: _cmd]; } +/** Saves (pushes) a copy of the current gstate information onto the + gstate stack. This saves drawing information contained in the + gstate, such as the current path, ctm and colors. */ - (void) DPSgsave { [self subclassResponsibility: _cmd]; } +/** Depreciated. Use -DPSDefineGState to create a gstate it and tag it + with a id tag. */ - (void) DPSgstate { [self subclassResponsibility: _cmd]; @@ -901,22 +910,33 @@ NSGraphicsContext *GSCurrentContext() [self subclassResponsibility: _cmd]; } +/** Makes the gstate indicated by the tag gst the current gstate. Note + that the gstate is copied, so that changes to either gstate do not + affect the other. */ - (void) DPSsetgstate: (int)gst { [self subclassResponsibility: _cmd]; } +/** Creates a copy of the current gstate and associates it with a tag, + which is given in the return value. This tag can later be used in + -DPSsetgstate: to set the gstate as being current again. */ - (int) GSDefineGState { [self subclassResponsibility: _cmd]; return 0; } +/** Disassociates the tag gst with it's gstate and destroys the gstate + object. The tag will no longer be valid and should not be used to + refer to the gstate again. */ - (void) GSUndefineGState: (int)gst { [self subclassResponsibility: _cmd]; } +/** Replaces the gstate refered to by the tag gst with the current + gstate. The former gstate is destroyed. */ - (void) GSReplaceGState: (int)gst { [self subclassResponsibility: _cmd]; diff --git a/Source/NSView.m b/Source/NSView.m index ec62f684f..7d2fb93e8 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -1505,7 +1505,6 @@ GSSetDragTypes(NSView* obj, NSArray *types) _renew_gstate = 0; if (_allocate_gstate) { - DPSgstate(ctxt); _gstate = GSDefineGState(ctxt); /* Balance the previous gsave and install our own gstate */ DPSgrestore(ctxt); diff --git a/Source/NSWindow.m b/Source/NSWindow.m index d2a3515ae..605e90017 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -666,7 +666,6 @@ static NSNotificationCenter *nc = nil; // Set window in new _gstate DPSgsave(context); [srv windowdevice: _windowNum]; - DPSgstate(context); _gstate = GSDefineGState(context); DPSgrestore(context); NSMapInsert (windowmaps, (void*)_windowNum, self);