New def of GSDefineGState

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13328 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-04-02 21:54:22 +00:00
parent 54c0fcdde7
commit 301fdac101
5 changed files with 29 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2002-04-02 Adam Fedor <fedor@gnu.org>
* 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 <pyrivail@ens-lyon.fr>
* Source/NSTableView.m ([NSTableView -scrollRowToVisible:]):

View file

@ -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 \

View file

@ -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];

View file

@ -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);

View file

@ -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);