mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Remove old grpahics funcs, Update window's defs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13417 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d051206a5
commit
37280413e6
12 changed files with 42 additions and 72 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2002-04-10 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Headers/gnustep/gui/AppKitExceptions.h: Add GNUstep exception.
|
||||
* Source/externs.m: Idem.
|
||||
* Headers/gnustep/gui/DPSOperators.h: Remove currentgstate, gstate
|
||||
* Headers/gnustep/gui/PSOperators.h: Idem.
|
||||
* Headers/gnustep/gui/GSMethodTable.h: Idem.
|
||||
* Headers/gnustep/gui/NSGraphicsContext.h: Idem.
|
||||
* Source/NSGraphicsContext.m: Idem. Redefine subclassResponsibility
|
||||
to through our own exception.
|
||||
|
||||
* Headers/gnustep/gui/GSDisplayServer.h: Prefix functions with
|
||||
APPKIT_DECLARE. Fix windowbacking def.
|
||||
|
||||
* Source/libgnustep-gui.def: Add GSDisplayServer.
|
||||
|
||||
Tue Apr 9 23:04:43 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
* Source/GSTable.m ([-setFrame:], [-setFrameSize:]): New methods.
|
||||
|
|
|
@ -66,4 +66,8 @@ APPKIT_EXPORT NSString *NSWindowServerCommunicationException;
|
|||
APPKIT_EXPORT NSString *NSWordTablesReadException;
|
||||
APPKIT_EXPORT NSString *NSWordTablesWriteException;
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
APPKIT_EXPORT NSString *GSWindowServerInternalException;
|
||||
#endif
|
||||
|
||||
#endif /* __AppKit_AppKitExceptions_h__ */
|
||||
|
|
|
@ -169,10 +169,6 @@ __attribute__((unused));
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
static inline void
|
||||
DPScurrentgstate(GSCTXT *ctxt, int gst)
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
DPSgrestore(GSCTXT *ctxt)
|
||||
__attribute__((unused));
|
||||
|
@ -181,10 +177,6 @@ static inline void
|
|||
DPSgsave(GSCTXT *ctxt)
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
DPSgstate(GSCTXT *ctxt)
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
DPSinitgraphics(GSCTXT *ctxt)
|
||||
__attribute__((unused));
|
||||
|
@ -704,13 +696,6 @@ GSShowGlyphs(GSCTXT *ctxt, const NSGlyph * glyphs, size_t length)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
static inline void
|
||||
DPScurrentgstate(GSCTXT *ctxt, int gst)
|
||||
{
|
||||
(ctxt->methods->DPScurrentgstate_)
|
||||
(ctxt, @selector(DPScurrentgstate:), gst);
|
||||
}
|
||||
|
||||
static inline void
|
||||
DPSgrestore(GSCTXT *ctxt)
|
||||
{
|
||||
|
@ -725,13 +710,6 @@ DPSgsave(GSCTXT *ctxt)
|
|||
(ctxt, @selector(DPSgsave));
|
||||
}
|
||||
|
||||
static inline void
|
||||
DPSgstate(GSCTXT *ctxt)
|
||||
{
|
||||
(ctxt->methods->DPSgstate)
|
||||
(ctxt, @selector(DPSgstate));
|
||||
}
|
||||
|
||||
static inline void
|
||||
DPSinitgraphics(GSCTXT *ctxt)
|
||||
{
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
@class GSDisplayServer;
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
GSDisplayServer * GSServerForWindow(NSWindow *window);
|
||||
GSDisplayServer * GSCurrentServer(void);
|
||||
APPKIT_DECLARE GSDisplayServer * GSServerForWindow(NSWindow *window);
|
||||
APPKIT_DECLARE GSDisplayServer * GSCurrentServer(void);
|
||||
|
||||
@interface GSDisplayServer : NSObject
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ GSDisplayServer * GSCurrentServer(void);
|
|||
- (int) window: (NSRect)frame : (NSBackingStoreType)type : (unsigned int)style;
|
||||
- (void) termwindow: (int) win;
|
||||
- (void) stylewindow: (int) style : (int) win;
|
||||
- (void) windowbacking: (NSBackingStoreType)type;
|
||||
- (void) windowbacking: (NSBackingStoreType)type : (int) win;
|
||||
- (void) titlewindow: (NSString *) window_title : (int) win;
|
||||
- (void) miniwindow: (int) win;
|
||||
- (BOOL) appOwnsMiniwindow;
|
||||
|
|
|
@ -115,14 +115,10 @@ typedef struct {
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
void (*DPScurrentgstate_)
|
||||
(NSGraphicsContext*, SEL, int);
|
||||
void (*DPSgrestore)
|
||||
(NSGraphicsContext*, SEL);
|
||||
void (*DPSgsave)
|
||||
(NSGraphicsContext*, SEL);
|
||||
void (*DPSgstate)
|
||||
(NSGraphicsContext*, SEL);
|
||||
void (*DPSinitgraphics)
|
||||
(NSGraphicsContext*, SEL);
|
||||
void (*DPSsetgstate_)
|
||||
|
|
|
@ -259,10 +259,8 @@ APPKIT_DECLARE NSGraphicsContext *GSCurrentContext();
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPScurrentgstate: (int)gst;
|
||||
- (void) DPSgrestore;
|
||||
- (void) DPSgsave;
|
||||
- (void) DPSgstate;
|
||||
- (void) DPSinitgraphics;
|
||||
- (void) DPSsetgstate: (int)gst;
|
||||
|
||||
|
|
|
@ -117,10 +117,6 @@ __attribute__((unused));
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
static inline void
|
||||
PScurrentgstate(int gst)
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
PSgrestore()
|
||||
__attribute__((unused));
|
||||
|
@ -129,10 +125,6 @@ static inline void
|
|||
PSgsave()
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
PSgstate()
|
||||
__attribute__((unused));
|
||||
|
||||
static inline void
|
||||
PSinitgraphics()
|
||||
__attribute__((unused));
|
||||
|
@ -499,18 +491,6 @@ PSyshow(const char* s, const float* numarray, int size)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
static inline void
|
||||
PScurrentgstate(int gst)
|
||||
{
|
||||
DPScurrentgstate(DEFCTXT, gst);
|
||||
}
|
||||
|
||||
static inline void
|
||||
PSgrestore()
|
||||
{
|
||||
DPSgrestore(DEFCTXT);
|
||||
}
|
||||
|
||||
static inline void
|
||||
PSgsave()
|
||||
{
|
||||
|
@ -518,9 +498,9 @@ PSgsave()
|
|||
}
|
||||
|
||||
static inline void
|
||||
PSgstate()
|
||||
PSgrestore()
|
||||
{
|
||||
DPSgstate(DEFCTXT);
|
||||
DPSgrestore(DEFCTXT);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
@ -444,7 +444,7 @@ GSCurrentServer(void)
|
|||
}
|
||||
|
||||
/** Changes window's the backing store to type */
|
||||
- (void) windowbacking: (NSBackingStoreType)type
|
||||
- (void) windowbacking: (NSBackingStoreType)type : (int) win
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
|
|
@ -104,7 +104,8 @@ _NSAppKitUncaughtExceptionHandler (NSException *exception)
|
|||
* its a sever error, use a non-graphical exception handler
|
||||
*/
|
||||
if (GSCurrentContext() == nil
|
||||
|| [[exception name] isEqual: NSWindowServerCommunicationException])
|
||||
|| [[exception name] isEqual: NSWindowServerCommunicationException]
|
||||
|| [[exception name] isEqual: GSWindowServerInternalException])
|
||||
{
|
||||
/* The following will raise again the exception using the base
|
||||
library exception handler */
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <Foundation/NSSet.h>
|
||||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSZone.h>
|
||||
#include "AppKit/AppKitExceptions.h"
|
||||
#include "AppKit/NSGraphicsContext.h"
|
||||
#include "AppKit/NSAffineTransform.h"
|
||||
#include "AppKit/NSWindow.h"
|
||||
|
@ -463,14 +464,10 @@ NSGraphicsContext *GSCurrentContext()
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate Handling */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
methodTable.DPScurrentgstate_ =
|
||||
GET_IMP(@selector(DPScurrentgstate:));
|
||||
methodTable.DPSgrestore =
|
||||
GET_IMP(@selector(DPSgrestore));
|
||||
methodTable.DPSgsave =
|
||||
GET_IMP(@selector(DPSgsave));
|
||||
methodTable.DPSgstate =
|
||||
GET_IMP(@selector(DPSgstate));
|
||||
methodTable.DPSinitgraphics =
|
||||
GET_IMP(@selector(DPSinitgraphics));
|
||||
methodTable.DPSsetgstate_ =
|
||||
|
@ -654,6 +651,16 @@ NSGraphicsContext *GSCurrentContext()
|
|||
return mptr;
|
||||
}
|
||||
|
||||
- (id) subclassResponsibility: (SEL)aSel
|
||||
{
|
||||
[NSException raise: GSWindowServerInternalException
|
||||
format: @"subclass %s(%s) should override %s",
|
||||
object_get_class_name(self),
|
||||
GSObjCIsInstance(self) ? "instance" : "class",
|
||||
sel_get_name(aSel)];
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -876,12 +883,6 @@ 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 */
|
||||
|
@ -898,13 +899,6 @@ NSGraphicsContext *GSCurrentContext()
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
/** Depreciated. Use -DPSDefineGState to create a gstate it and tag it
|
||||
with a id tag. */
|
||||
- (void) DPSgstate
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSinitgraphics
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
|
|
@ -73,6 +73,8 @@ NSString *NSWindowServerCommunicationException = @"WindowServerCommunication";
|
|||
NSString *NSWordTablesReadException = @"WordTablesRead";
|
||||
NSString *NSWordTablesWriteException = @"WordTablesWrite";
|
||||
|
||||
NSString *GSWindowServerInternalException = @"WindowServerInternal";
|
||||
|
||||
// Application notifications
|
||||
NSString *NSApplicationDidBecomeActiveNotification
|
||||
= @"ApplicationDidBecomeActive";
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
LIBRARY libgnustep-gui
|
||||
EXPORTS
|
||||
__objc_class_name_GSComboWindow
|
||||
__objc_class_name_GSDisplayServer
|
||||
__objc_class_name_GSFontEnumerator
|
||||
__objc_class_name_GSFontInfo
|
||||
__objc_class_name_GSHbox
|
||||
|
|
Loading…
Reference in a new issue