1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1995-1998 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 /* LINTLIBRARY */ 30 31 /* 32 * wattr_on.c 33 * 34 * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved. 35 * 36 */ 37 38 #ifdef M_RCSID 39 #ifndef lint 40 static char rcsID[] = 41 "$Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/" 42 "libxcurses/src/libc/xcurses/rcs/wattr_on.c 1.3 1998/05/28 17:10:27 " 43 "cbates Exp $"; 44 #endif 45 #endif 46 47 #include <private.h> 48 49 #undef wattr_on 50 51 /* ARGSUSED */ 52 int 53 wattr_on(WINDOW *w, attr_t at, void *opts) 54 { 55 w->_fg._at |= at; 56 57 return (OK); 58 } 59 60 #undef wattr_off 61 62 /* ARGSUSED */ 63 int 64 wattr_off(WINDOW *w, attr_t at, void *opts) 65 { 66 w->_fg._at &= ~at; 67 68 return (OK); 69 } 70 71 #undef wattr_set 72 73 /* ARGSUSED */ 74 int 75 wattr_set(WINDOW *w, attr_t at, short co, void *opts) 76 { 77 w->_fg._co = co; 78 w->_fg._at = w->_bg._at | at; 79 80 return (OK); 81 } 82 83 #undef wattr_get 84 85 /* ARGSUSED */ 86 int 87 wattr_get(WINDOW *w, attr_t *at, short *co, void *opts) 88 { 89 if (at != NULL) 90 *at = w->_fg._at; 91 92 if (co != NULL) 93 *co = w->_fg._co; 94 95 return (OK); 96 } 97 98 #undef wcolor_set 99 100 /* ARGSUSED */ 101 int 102 wcolor_set(WINDOW *w, short co, void *opts) 103 { 104 w->_fg._co = co; 105 106 return (OK); 107 } 108 109 #undef wstandout 110 111 int 112 wstandout(WINDOW *w) 113 { 114 w->_fg._at |= WA_STANDOUT; 115 116 return (1); 117 } 118 119 #undef wstandend 120 121 int 122 wstandend(WINDOW *w) 123 { 124 w->_fg._at = WA_NORMAL; 125 126 return (1); 127 } 128