summaryrefslogtreecommitdiff
path: root/vcl/unx/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/source')
-rw-r--r--vcl/unx/source/app/i18n_cb.cxx547
-rw-r--r--vcl/unx/source/app/i18n_ic.cxx686
-rw-r--r--vcl/unx/source/app/i18n_im.cxx332
-rw-r--r--vcl/unx/source/app/i18n_wrp.cxx293
-rw-r--r--vcl/unx/source/app/i18n_xkb.cxx195
-rw-r--r--vcl/unx/source/app/keysymnames.cxx545
-rw-r--r--vcl/unx/source/app/makefile.mk142
-rw-r--r--vcl/unx/source/app/saldata.cxx854
-rw-r--r--vcl/unx/source/app/saldisp.cxx3653
-rw-r--r--vcl/unx/source/app/salinst.cxx346
-rw-r--r--vcl/unx/source/app/salsys.cxx200
-rw-r--r--vcl/unx/source/app/saltimer.cxx129
-rw-r--r--vcl/unx/source/app/sm.cxx347
-rw-r--r--vcl/unx/source/app/soicon.cxx502
-rw-r--r--vcl/unx/source/gdi/cdeint.cxx572
-rw-r--r--vcl/unx/source/gdi/dtint.cxx1169
-rw-r--r--vcl/unx/source/gdi/makefile.mk124
-rw-r--r--vcl/unx/source/gdi/salbmp.cxx885
-rw-r--r--vcl/unx/source/gdi/salcvt.cxx434
-rw-r--r--vcl/unx/source/gdi/salcvt.hxx116
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx975
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx810
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx1074
-rw-r--r--vcl/unx/source/gdi/salogl.cxx393
-rw-r--r--vcl/unx/source/gdi/salvd.cxx239
-rw-r--r--vcl/unx/source/gdi/xfont.cxx559
-rw-r--r--vcl/unx/source/gdi/xlfd_attr.cxx655
-rw-r--r--vcl/unx/source/gdi/xlfd_attr.hxx266
-rw-r--r--vcl/unx/source/gdi/xlfd_extd.cxx699
-rw-r--r--vcl/unx/source/gdi/xlfd_extd.hxx251
-rw-r--r--vcl/unx/source/gdi/xlfd_smpl.cxx285
-rw-r--r--vcl/unx/source/gdi/xlfd_smpl.hxx132
-rw-r--r--vcl/unx/source/inc/airbrush_curs.h74
-rw-r--r--vcl/unx/source/inc/airbrush_mask.h74
-rw-r--r--vcl/unx/source/inc/ase_curs.h74
-rw-r--r--vcl/unx/source/inc/ase_mask.h74
-rw-r--r--vcl/unx/source/inc/asn_curs.h74
-rw-r--r--vcl/unx/source/inc/asn_mask.h74
-rw-r--r--vcl/unx/source/inc/asne_curs.h74
-rw-r--r--vcl/unx/source/inc/asne_mask.h74
-rw-r--r--vcl/unx/source/inc/asns_curs.h74
-rw-r--r--vcl/unx/source/inc/asns_mask.h74
-rw-r--r--vcl/unx/source/inc/asnswe_curs.h74
-rw-r--r--vcl/unx/source/inc/asnswe_mask.h74
-rw-r--r--vcl/unx/source/inc/asnw_curs.h74
-rw-r--r--vcl/unx/source/inc/asnw_mask.h74
-rw-r--r--vcl/unx/source/inc/ass_curs.h74
-rw-r--r--vcl/unx/source/inc/ass_mask.h74
-rw-r--r--vcl/unx/source/inc/asse_curs.h74
-rw-r--r--vcl/unx/source/inc/asse_mask.h74
-rw-r--r--vcl/unx/source/inc/assw_curs.h74
-rw-r--r--vcl/unx/source/inc/assw_mask.h74
-rw-r--r--vcl/unx/source/inc/asw_curs.h74
-rw-r--r--vcl/unx/source/inc/asw_mask.h74
-rw-r--r--vcl/unx/source/inc/aswe_curs.h74
-rw-r--r--vcl/unx/source/inc/aswe_mask.h74
-rw-r--r--vcl/unx/source/inc/chain_curs.h74
-rw-r--r--vcl/unx/source/inc/chain_mask.h72
-rw-r--r--vcl/unx/source/inc/chainnot_curs.h74
-rw-r--r--vcl/unx/source/inc/chainnot_mask.h72
-rw-r--r--vcl/unx/source/inc/chart_curs.h74
-rw-r--r--vcl/unx/source/inc/chart_mask.h74
-rw-r--r--vcl/unx/source/inc/copydata_curs.h76
-rw-r--r--vcl/unx/source/inc/copydata_mask.h76
-rw-r--r--vcl/unx/source/inc/copydlnk_curs.h76
-rw-r--r--vcl/unx/source/inc/copydlnk_mask.h76
-rw-r--r--vcl/unx/source/inc/copyfile_curs.h76
-rw-r--r--vcl/unx/source/inc/copyfile_mask.h76
-rw-r--r--vcl/unx/source/inc/copyfiles_curs.h76
-rw-r--r--vcl/unx/source/inc/copyfiles_mask.h76
-rw-r--r--vcl/unx/source/inc/copyflnk_curs.h76
-rw-r--r--vcl/unx/source/inc/copyflnk_mask.h76
-rw-r--r--vcl/unx/source/inc/crook_curs.h76
-rw-r--r--vcl/unx/source/inc/crook_mask.h74
-rw-r--r--vcl/unx/source/inc/crop_curs.h76
-rw-r--r--vcl/unx/source/inc/crop_mask.h74
-rw-r--r--vcl/unx/source/inc/detective_curs.h74
-rw-r--r--vcl/unx/source/inc/detective_mask.h74
-rw-r--r--vcl/unx/source/inc/drawarc_curs.h76
-rw-r--r--vcl/unx/source/inc/drawarc_mask.h74
-rw-r--r--vcl/unx/source/inc/drawbezier_curs.h76
-rw-r--r--vcl/unx/source/inc/drawbezier_mask.h74
-rw-r--r--vcl/unx/source/inc/drawcaption_curs.h76
-rw-r--r--vcl/unx/source/inc/drawcaption_mask.h74
-rw-r--r--vcl/unx/source/inc/drawcirclecut_curs.h76
-rw-r--r--vcl/unx/source/inc/drawcirclecut_mask.h74
-rw-r--r--vcl/unx/source/inc/drawconnect_curs.h76
-rw-r--r--vcl/unx/source/inc/drawconnect_mask.h74
-rw-r--r--vcl/unx/source/inc/drawcrook_curs.h76
-rw-r--r--vcl/unx/source/inc/drawcrook_mask.h74
-rw-r--r--vcl/unx/source/inc/drawcrop_curs.h76
-rw-r--r--vcl/unx/source/inc/drawcrop_mask.h74
-rw-r--r--vcl/unx/source/inc/drawellipse_curs.h76
-rw-r--r--vcl/unx/source/inc/drawellipse_mask.h74
-rw-r--r--vcl/unx/source/inc/drawfreehand_curs.h76
-rw-r--r--vcl/unx/source/inc/drawfreehand_mask.h74
-rw-r--r--vcl/unx/source/inc/drawline_curs.h76
-rw-r--r--vcl/unx/source/inc/drawline_mask.h74
-rw-r--r--vcl/unx/source/inc/drawmirror_curs.h76
-rw-r--r--vcl/unx/source/inc/drawmirror_mask.h74
-rw-r--r--vcl/unx/source/inc/drawpie_curs.h76
-rw-r--r--vcl/unx/source/inc/drawpie_mask.h74
-rw-r--r--vcl/unx/source/inc/drawpolygon_curs.h76
-rw-r--r--vcl/unx/source/inc/drawpolygon_mask.h74
-rw-r--r--vcl/unx/source/inc/drawrect_curs.h76
-rw-r--r--vcl/unx/source/inc/drawrect_mask.h74
-rw-r--r--vcl/unx/source/inc/drawtext_curs.h76
-rw-r--r--vcl/unx/source/inc/drawtext_mask.h74
-rw-r--r--vcl/unx/source/inc/fill_curs.h74
-rw-r--r--vcl/unx/source/inc/fill_mask.h74
-rw-r--r--vcl/unx/source/inc/hshear_curs.h76
-rw-r--r--vcl/unx/source/inc/hshear_mask.h74
-rw-r--r--vcl/unx/source/inc/invert50.h99
-rw-r--r--vcl/unx/source/inc/linkdata_curs.h76
-rw-r--r--vcl/unx/source/inc/linkdata_mask.h76
-rw-r--r--vcl/unx/source/inc/linkfile_curs.h76
-rw-r--r--vcl/unx/source/inc/linkfile_mask.h76
-rw-r--r--vcl/unx/source/inc/magnify_curs.h68
-rw-r--r--vcl/unx/source/inc/magnify_mask.h66
-rw-r--r--vcl/unx/source/inc/mirror_curs.h76
-rw-r--r--vcl/unx/source/inc/mirror_mask.h74
-rw-r--r--vcl/unx/source/inc/movebezierweight_curs.h76
-rw-r--r--vcl/unx/source/inc/movebezierweight_mask.h74
-rw-r--r--vcl/unx/source/inc/movedata_curs.h76
-rw-r--r--vcl/unx/source/inc/movedata_mask.h76
-rw-r--r--vcl/unx/source/inc/movedlnk_curs.h76
-rw-r--r--vcl/unx/source/inc/movedlnk_mask.h76
-rw-r--r--vcl/unx/source/inc/movefile_curs.h76
-rw-r--r--vcl/unx/source/inc/movefile_mask.h76
-rw-r--r--vcl/unx/source/inc/movefiles_curs.h76
-rw-r--r--vcl/unx/source/inc/movefiles_mask.h76
-rw-r--r--vcl/unx/source/inc/moveflnk_curs.h76
-rw-r--r--vcl/unx/source/inc/moveflnk_mask.h76
-rw-r--r--vcl/unx/source/inc/movepoint_curs.h76
-rw-r--r--vcl/unx/source/inc/movepoint_mask.h74
-rw-r--r--vcl/unx/source/inc/nodrop_curs.h76
-rw-r--r--vcl/unx/source/inc/nodrop_mask.h76
-rw-r--r--vcl/unx/source/inc/null_curs.h65
-rw-r--r--vcl/unx/source/inc/null_mask.h63
-rw-r--r--vcl/unx/source/inc/pivotcol_curs.h74
-rw-r--r--vcl/unx/source/inc/pivotcol_mask.h74
-rw-r--r--vcl/unx/source/inc/pivotfld_curs.h74
-rw-r--r--vcl/unx/source/inc/pivotfld_mask.h74
-rw-r--r--vcl/unx/source/inc/pivotrow_curs.h74
-rw-r--r--vcl/unx/source/inc/pivotrow_mask.h74
-rw-r--r--vcl/unx/source/inc/rotate_curs.h76
-rw-r--r--vcl/unx/source/inc/rotate_mask.h74
-rw-r--r--vcl/unx/source/inc/timemove_curs.h74
-rw-r--r--vcl/unx/source/inc/timemove_mask.h74
-rw-r--r--vcl/unx/source/inc/timesize_curs.h74
-rw-r--r--vcl/unx/source/inc/timesize_mask.h74
-rw-r--r--vcl/unx/source/inc/vshear_curs.h76
-rw-r--r--vcl/unx/source/inc/vshear_mask.h74
-rw-r--r--vcl/unx/source/window/FWS.cxx314
-rw-r--r--vcl/unx/source/window/FWS.hxx98
-rw-r--r--vcl/unx/source/window/makefile.mk97
-rw-r--r--vcl/unx/source/window/salframe.cxx2614
-rw-r--r--vcl/unx/source/window/salobj.cxx447
158 files changed, 31018 insertions, 0 deletions
diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx
new file mode 100644
index 000000000000..434b356054fd
--- /dev/null
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -0,0 +1,547 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18n_cb.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+#ifdef SOLARIS
+#include <alloca.h>
+#endif
+#include <prex.h>
+#include <X11/Xlocale.h>
+#include <X11/Xlib.h>
+#include <postx.h>
+
+#include <salunx.h>
+#include "XIM.h"
+
+#ifndef _SAL_I18N_CALLBACK_HXX
+#include "i18n_cb.hxx"
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+
+// -------------------------------------------------------------------------
+//
+// i. preedit start callback
+//
+// -------------------------------------------------------------------------
+
+int
+PreeditStartCallback ( XIC ic, XPointer client_data, XPointer call_data )
+{
+ #define PREEDIT_BUFSZ 16
+
+ preedit_data_t* pPreeditData = (preedit_data_t*)client_data;
+
+ if ( pPreeditData->eState == ePreeditStatusActivationRequired )
+ {
+ pPreeditData->eState = ePreeditStatusActive;
+
+ pPreeditData->aText.pUnicodeBuffer =
+ (sal_Unicode*)malloc(PREEDIT_BUFSZ * sizeof(sal_Unicode));
+ pPreeditData->aText.pCharStyle =
+ (XIMFeedback*)malloc(PREEDIT_BUFSZ * sizeof(XIMFeedback));
+ pPreeditData->aText.nCursorPos = 0;
+ pPreeditData->aText.nLength = 0;
+ pPreeditData->aText.nSize = PREEDIT_BUFSZ;
+
+ pPreeditData->pFrame->maFrameData.Call(SALEVENT_STARTEXTTEXTINPUT,
+ (void*)NULL );
+ }
+
+ return -1;
+}
+
+// -------------------------------------------------------------------------
+//
+// ii. preedit done callback
+//
+// -------------------------------------------------------------------------
+
+void
+PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data )
+{
+ preedit_data_t* pPreeditData = (preedit_data_t*)client_data;
+
+ if (pPreeditData->eState == ePreeditStatusActive )
+ pPreeditData->pFrame->maFrameData.Call(
+ SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
+ pPreeditData->eState = ePreeditStatusStartPending;
+
+ if ( pPreeditData->aText.pUnicodeBuffer != NULL )
+ {
+ free (pPreeditData->aText.pUnicodeBuffer);
+ pPreeditData->aText.pUnicodeBuffer = NULL;
+ }
+ if ( pPreeditData->aText.pCharStyle != NULL )
+ {
+ free (pPreeditData->aText.pCharStyle);
+ pPreeditData->aText.pCharStyle = NULL;
+ }
+}
+
+// -------------------------------------------------------------------------
+//
+// iii. preedit draw callback
+//
+// -------------------------------------------------------------------------
+
+//
+// Handle deletion of text in a preedit_draw_callback
+// from and howmuch are guaranteed to be nonnegative
+//
+
+void
+Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch)
+{
+ int to = from + howmuch;
+
+ if (to == ptext->nLength)
+ {
+ // delete from the end of the text
+ ptext->nLength = from;
+ }
+ else
+ if (to < ptext->nLength)
+ {
+ // cut out of the middle of the text
+ memmove( (void*)(ptext->pUnicodeBuffer + from),
+ (void*)(ptext->pUnicodeBuffer + to),
+ (ptext->nLength - to) * sizeof(sal_Unicode));
+ memmove( (void*)(ptext->pCharStyle + from),
+ (void*)(ptext->pCharStyle + to),
+ (ptext->nLength - to) * sizeof(sal_Unicode));
+ ptext->nLength -= howmuch;
+ }
+ else
+ // if ( to > pText->nLength )
+ {
+ // XXX this indicates an error, are we out of sync ?
+ fprintf(stderr, "Preedit_DeleteText( from=%i to=%i length=%i )\n",
+ from, to, ptext->nLength );
+ fprintf (stderr, "\t XXX internal error, out of sync XXX\n");
+
+ ptext->nLength = from;
+ }
+
+ // NULL-terminate the string
+ ptext->pUnicodeBuffer[ptext->nLength] = (sal_Unicode)0;
+}
+
+// reallocate the textbuffer with sufficiently large size 2^x
+// nnewlimit is presupposed to be larger than ptext->size
+void
+enlarge_buffer ( preedit_text_t *ptext, int nnewlimit )
+{
+ size_t nnewsize = ptext->nSize;
+
+ while ( nnewsize <= nnewlimit )
+ nnewsize *= 2;
+
+ ptext->nSize = nnewsize;
+ ptext->pUnicodeBuffer = (sal_Unicode*)realloc((void*)ptext->pUnicodeBuffer,
+ nnewsize * sizeof(sal_Unicode));
+ ptext->pCharStyle = (XIMFeedback*)realloc((void*)ptext->pCharStyle,
+ nnewsize * sizeof(XIMFeedback));
+}
+
+//
+// Handle insertion of text in a preedit_draw_callback
+// string field of XIMText struct is guaranteed to be != NULL
+//
+
+void
+Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where,
+ Bool isMultilingual)
+{
+ sal_Unicode *pInsertTextString;
+ int nInsertTextLength = 0;
+ XIMFeedback *pInsertTextCharStyle = pInsertText->feedback;
+
+ nInsertTextLength = pInsertText->length;
+
+ if (isMultilingual)
+ {
+ XIMUnicodeText *pUniText = (XIMUnicodeText*)pInsertText;
+ pInsertTextString = pUniText->string.utf16_char;
+ }
+ else
+ {
+ // can't handle wchar_t strings, so convert to multibyte chars first
+ char *pMBString;
+ size_t nMBLength;
+ if (pInsertText->encoding_is_wchar)
+ {
+ wchar_t *pWCString = pInsertText->string.wide_char;
+ size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* dont care */);
+ pMBString = (char*)alloca( nBytes + 1 );
+ nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
+ }
+ else
+ {
+ pMBString = pInsertText->string.multi_byte;
+ nMBLength = strlen(pMBString); // xxx
+ }
+
+ // convert multibyte chars to unicode
+ rtl_TextEncoding nEncoding = gsl_getSystemTextEncoding();
+
+ if (nEncoding != RTL_TEXTENCODING_UNICODE)
+ {
+ rtl_TextToUnicodeConverter aConverter =
+ rtl_createTextToUnicodeConverter( nEncoding );
+ rtl_TextToUnicodeContext aContext =
+ rtl_createTextToUnicodeContext(aConverter);
+
+ sal_Size nBufferSize = nInsertTextLength * 2;
+
+ pInsertTextString = (sal_Unicode*)alloca(nBufferSize);
+
+ sal_uInt32 nConversionInfo;
+ sal_Size nConvertedChars;
+
+ sal_Size nSize =
+ rtl_convertTextToUnicode( aConverter, aContext,
+ pMBString, nMBLength,
+ pInsertTextString, nBufferSize,
+ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE,
+ &nConversionInfo, &nConvertedChars );
+
+ rtl_destroyTextToUnicodeContext(aConverter, aContext);
+ rtl_destroyTextToUnicodeConverter(aConverter);
+
+ }
+ else
+ {
+ pInsertTextString = (sal_Unicode*)pMBString;
+ }
+ }
+
+ // enlarge target text-buffer if necessary
+ if (pText->nSize <= (pText->nLength + nInsertTextLength))
+ enlarge_buffer(pText, pText->nLength + nInsertTextLength);
+
+ // insert text: displace old mem and put new bytes in
+ int from = where;
+ int to = where + nInsertTextLength;
+ int howmany = pText->nLength - where;
+
+ memmove((void*)(pText->pUnicodeBuffer + to),
+ (void*)(pText->pUnicodeBuffer + from),
+ howmany * sizeof(sal_Unicode));
+ memmove((void*)(pText->pCharStyle + to),
+ (void*)(pText->pCharStyle + from),
+ howmany * sizeof(XIMFeedback));
+
+ to = from;
+ howmany = nInsertTextLength;
+
+ memcpy((void*)(pText->pUnicodeBuffer + to), (void*)pInsertTextString,
+ howmany * sizeof(sal_Unicode));
+ memcpy((void*)(pText->pCharStyle + to), (void*)pInsertTextCharStyle,
+ howmany * sizeof(XIMFeedback));
+
+ pText->nLength += howmany;
+
+ // NULL-terminate the string
+ pText->pUnicodeBuffer[pText->nLength] = (sal_Unicode)0;
+}
+
+//
+// Handle the change of attributes in a preedit_draw_callback
+//
+void
+Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback,
+ int from, int amount )
+{
+ if ( (from + amount) > ptext->nLength )
+ {
+ // XXX this indicates an error, are we out of sync ?
+ fprintf (stderr, "Preedit_UpdateAttributes( %i + %i > %i )\n",
+ from, amount, ptext->nLength );
+ fprintf (stderr, "\t XXX internal error, out of sync XXX\n");
+
+ return;
+ }
+
+ memcpy ( ptext->pCharStyle + from,
+ feedback, amount * sizeof(XIMFeedback) );
+}
+
+// Convert the XIM feedback values into appropriate VCL
+// SAL_EXTTEXTINPUT_ATTR values
+// returns an allocate list of attributes, which must be freed by caller
+USHORT*
+Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength )
+{
+ USHORT *psalattr;
+ USHORT nval;
+ USHORT noldval = 0;
+ XIMFeedback nfeedback;
+
+ // only work with reasonable length
+ if (nlength > 0)
+ psalattr = (USHORT*)malloc(nlength * sizeof(USHORT));
+ else
+ return (USHORT*)NULL;
+
+ for (int npos = 0; npos < nlength; npos++)
+ {
+ nval = 0;
+ nfeedback = pfeedback[npos];
+
+ // means to use the feedback of the previous char
+ if (nfeedback == 0)
+ {
+ nval = noldval;
+ }
+ // convert feedback to attributes
+ else
+ {
+ if (nfeedback & XIMReverse)
+ nval |= SAL_EXTTEXTINPUT_ATTR_REDTEXT;
+ if (nfeedback & XIMUnderline)
+ nval |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ if (nfeedback & XIMHighlight)
+ nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT;
+ if (nfeedback & XIMPrimary)
+ nval |= SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE;
+ if (nfeedback & XIMSecondary)
+ nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE;
+ if (nfeedback & XIMTertiary) // same as 2ery
+ nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE;
+
+ #if 0 // visibility feedback not supported now
+ if ( (nfeedback & XIMVisibleToForward)
+ || (nfeedback & XIMVisibleToBackward)
+ || (nfeedback & XIMVisibleCenter) )
+ { }
+ #endif
+ }
+ // copy in list
+ psalattr[npos] = nval;
+ noldval = nval;
+ }
+ // return list of sal attributes
+ return psalattr;
+}
+
+void
+PreeditDrawCallback(XIC ic, XPointer client_data,
+ XIMPreeditDrawCallbackStruct *call_data)
+{
+ preedit_data_t* pPreeditData = (preedit_data_t*)client_data;
+
+ // if there's nothing to change then change nothing
+ if ( (call_data->text == NULL) && (call_data->chg_length == 0) )
+ return;
+
+ if ( pPreeditData->eState == ePreeditStatusStartPending )
+ pPreeditData->eState = ePreeditStatusActivationRequired;
+ PreeditStartCallback( ic, client_data, NULL );
+
+ // Edit the internal textbuffer as indicated by the call_data,
+ // chg_first and chg_length are guaranteed to be nonnegative
+
+ // handle text deletion
+ if (call_data->text == NULL)
+ {
+ Preedit_DeleteText(&(pPreeditData->aText),
+ call_data->chg_first, call_data->chg_length );
+ }
+ else
+ {
+ // handle text insertion
+ if ( (call_data->chg_length == 0)
+ && (call_data->text->string.wide_char != NULL))
+ {
+ Preedit_InsertText(&(pPreeditData->aText), call_data->text,
+ call_data->chg_first, pPreeditData->bIsMultilingual);
+ }
+ else
+ // handle text replacement by deletion and insertion of text,
+ // not smart, just good enough
+ if ( (call_data->chg_length != 0)
+ && (call_data->text->string.wide_char != NULL))
+ {
+ Preedit_DeleteText(&(pPreeditData->aText),
+ call_data->chg_first, call_data->chg_length);
+ Preedit_InsertText(&(pPreeditData->aText), call_data->text,
+ call_data->chg_first, pPreeditData->bIsMultilingual);
+ }
+ else
+ // not really a text update, only attributes are concerned
+ if ( (call_data->chg_length != 0)
+ && (call_data->text->string.wide_char == NULL))
+ {
+ Preedit_UpdateAttributes(&(pPreeditData->aText),
+ call_data->text->feedback,
+ call_data->chg_first, call_data->chg_length);
+ }
+ }
+
+ //
+ // build the SalExtTextInputEvent and send it up
+ //
+
+ SalExtTextInputEvent aTextEvent;
+
+ aTextEvent.mnTime = 0;
+ aTextEvent.mpTextAttr = Preedit_FeedbackToSAL(
+ pPreeditData->aText.pCharStyle, pPreeditData->aText.nLength);
+ aTextEvent.mnCursorPos = call_data->caret;
+ aTextEvent.maText = pPreeditData->aText.pUnicodeBuffer;
+ aTextEvent.mbCursorVisible = True;
+ aTextEvent.mnDeltaStart = 0; // call_data->chg_first;
+ aTextEvent.mbOnlyCursor = False;
+
+ if ( pPreeditData->eState == ePreeditStatusActive )
+ pPreeditData->pFrame->maFrameData.Call(SALEVENT_EXTTEXTINPUT,
+ (void*)&aTextEvent);
+ if (aTextEvent.mpTextAttr)
+ free((void*)aTextEvent.mpTextAttr);
+}
+
+// -------------------------------------------------------------------------
+//
+// iv. preedit caret callback
+//
+// -------------------------------------------------------------------------
+
+void
+PreeditCaretCallback ( XIC ic, XPointer client_data,
+ XIMPreeditCaretCallbackStruct *call_data )
+{
+ // XXX PreeditCaretCallback is pure debug code for now
+ char *direction = "?";
+ char *style = "?";
+
+ switch ( call_data->style )
+ {
+ case XIMIsInvisible: style = "Invisible"; break;
+ case XIMIsPrimary: style = "Primary"; break;
+ case XIMIsSecondary: style = "Secondary"; break;
+ }
+ switch ( call_data->direction )
+ {
+ case XIMForwardChar: direction = "Forward char"; break;
+ case XIMBackwardChar: direction = "Backward char"; break;
+ case XIMForwardWord: direction = "Forward word"; break;
+ case XIMBackwardWord: direction = "Backward word"; break;
+ case XIMCaretUp: direction = "Caret up"; break;
+ case XIMCaretDown: direction = "Caret down"; break;
+ case XIMNextLine: direction = "Next line"; break;
+ case XIMPreviousLine: direction = "Previous line"; break;
+ case XIMLineStart: direction = "Line start"; break;
+ case XIMLineEnd: direction = "Line end"; break;
+ case XIMAbsolutePosition: direction = "Absolute"; break;
+ case XIMDontChange: direction = "Dont change"; break;
+ }
+
+ fprintf (stderr, "PreeditCaretCallback( ic=%i, client=%i,\n",
+ (unsigned int)ic, (unsigned int)client_data );
+ fprintf (stderr, "\t position=%i, direction=\"%s\", style=\"%s\" )\n",
+ call_data->position, direction, style );
+
+ // XXX
+}
+
+// -----------------------------------------------------------------------
+//
+// v. commit string callback: convert an extended text input (iiimp ... )
+// into an ordinary key-event
+//
+// -----------------------------------------------------------------------
+
+int
+CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data )
+{
+ preedit_data_t* pPreeditData = (preedit_data_t*)client_data;
+
+ XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data;
+ sal_Unicode *p_unicode_data = (sal_Unicode*)cbtext->string.utf16_char;
+ p_unicode_data[cbtext->length] = (sal_Unicode)0;
+
+ if ( pPreeditData->eState == ePreeditStatusActive )
+ PreeditDoneCallback( ic, client_data, call_data );
+
+ pPreeditData->pFrame->maFrameData.Call( SALEVENT_STARTEXTTEXTINPUT,
+ (void*)NULL );
+
+ SalExtTextInputEvent aTextEvent;
+
+ aTextEvent.mnTime = 0;
+ aTextEvent.mpTextAttr = 0;
+ aTextEvent.mnCursorPos = cbtext->length;
+ aTextEvent.maText = p_unicode_data;
+ aTextEvent.mbCursorVisible = True;
+ aTextEvent.mnDeltaStart = 0;
+ aTextEvent.mbOnlyCursor = False;
+
+ pPreeditData->pFrame->maFrameData.Call( SALEVENT_EXTTEXTINPUT,
+ (void*)&aTextEvent);
+ pPreeditData->pFrame->maFrameData.Call( SALEVENT_ENDEXTTEXTINPUT,
+ (void*)NULL );
+
+ return 0;
+}
+
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
new file mode 100644
index 000000000000..4e2f34b77d22
--- /dev/null
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -0,0 +1,686 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18n_ic.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+#include <alloca.h>
+
+#include <prex.h>
+#include <X11/Xlocale.h>
+#include <X11/Xlib.h>
+#include <postx.h>
+
+#include <salunx.h>
+
+#include <XIM.h>
+
+#ifndef _SAL_I18N_INPUTCONTEXT_HXX
+#include "i18n_ic.hxx"
+#endif
+#ifndef _SAL_I18N_INPUTMETHOD_HXX
+#include "i18n_im.hxx"
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+
+// ---------------------------------------------------------------------------
+//
+// Constructor / Destructor, the InputContext is bound to the SalFrame, as it
+// needs the shell window as a focus window
+//
+// ----------------------------------------------------------------------------
+
+SalI18N_InputContext::~SalI18N_InputContext()
+{
+ if ( maContext != NULL )
+ XDestroyIC( maContext );
+ if ( mpAttributes != NULL )
+ XFree( mpAttributes );
+ if ( mpStatusAttributes != NULL )
+ XFree( mpStatusAttributes );
+ if ( mpPreeditAttributes != NULL )
+ XFree( mpPreeditAttributes );
+ #ifdef SOLARIS
+ if ( mpFontSet != NULL )
+ XFreeFontSet( mpDisplay, mpFontSet );
+ #endif
+}
+
+#ifdef DEBUG
+
+// ----------------------------------------------------------------------------
+// debug routines, that keep track of fonts we've chosen in a fontset
+// ----------------------------------------------------------------------------
+
+// report which fonts are missing for the requested
+// basefont and which fonts are actually selected
+
+static void
+v_print_missing_fonts( char **pp_list, int n_listsz, const char *p_pattern )
+{
+ if ( !(n_listsz > 0) || (pp_list == NULL) || (p_pattern == NULL) )
+ return;
+
+ for (int i = 0; i < n_listsz; i++ )
+ fprintf(stderr, "missing charset@%s:\"%s\"\n", p_pattern, pp_list[i] );
+}
+
+static void
+v_print_chosen_fonts( XFontSet a_fontset )
+{
+ if ( a_fontset == 0 )
+ return;
+
+ char *p_locale_name;
+ XFontStruct **pp_font_struct_list;
+ char **pp_font_name_list;
+ int n_listsz;
+
+ p_locale_name = XLocaleOfFontSet( a_fontset );
+ n_listsz = XFontsOfFontSet( a_fontset,
+ &pp_font_struct_list,
+ &pp_font_name_list );
+ for ( int i = 0; i < n_listsz; i++ )
+ {
+ fprintf( stderr, "font@%s:\"%s\"\n",
+ p_locale_name, pp_font_name_list[i] );
+ }
+}
+
+#endif // DEBUG
+
+// Wrapper for XCreateFontSet to create a default font set
+static XFontSet
+p_create_fontset( Display *p_display )
+{
+ // a fontset, as there is no valid default for russian and all other
+ // eastern european locales in solaris 8
+ const char *p_base_font[] = {
+ "-*-application-medium-r-*-sans-12-*",
+ "-*-application-*-r-*-*-12-*",
+ "-*-*-*-r-*-*-12-*",
+ "-*" };
+ char **pp_missing_charset_list = NULL;
+ int n_missing_charset_count = 0;
+ char *p_def_string = NULL;
+
+ XFontSet a_fontset;
+
+ for (int i = 0; i < (sizeof(p_base_font) / sizeof(char*)); i++ )
+ {
+ a_fontset = XCreateFontSet( p_display, p_base_font[i],
+ &pp_missing_charset_list,
+ &n_missing_charset_count, &p_def_string);
+ #ifdef DEBUG
+ v_print_missing_fonts ( pp_missing_charset_list,
+ n_missing_charset_count, p_base_font[i] );
+ #endif
+
+ if ( a_fontset != 0 )
+ break;
+ }
+
+ #ifdef DEBUG
+ v_print_chosen_fonts( a_fontset );
+ #endif
+
+ return a_fontset;
+}
+
+// ----------------------------------------------------------------------------
+// convenience routine to add items to a XVaNestedList
+// ----------------------------------------------------------------------------
+
+static XVaNestedList
+XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
+{
+ XVaNestedList a_dstlist;
+
+ // if ( value == NULL )
+ // return a_srclist;
+
+ if ( a_srclist == NULL )
+ {
+ a_dstlist = XVaCreateNestedList(
+ 0,
+ name, value,
+ 0 );
+ }
+ else
+ {
+ a_dstlist = XVaCreateNestedList(
+ 0,
+ XNVaNestedList, a_srclist,
+ name, value,
+ 0 );
+ }
+
+ return a_dstlist != NULL ? a_dstlist : a_srclist ;
+}
+
+// ---------------------------------------------------------------------------
+//
+// Constructor for a InputContext (IC)
+//
+// ----------------------------------------------------------------------------
+
+SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
+ mbUseable( True ),
+ maContext( (XIC)NULL ),
+ mpAttributes( NULL ),
+ mpStatusAttributes( NULL ),
+ mpPreeditAttributes( NULL ),
+ #ifdef SOLARIS
+ mpFontSet( NULL ),
+ #endif
+ mnStatusStyle( 0 ),
+ mnPreeditStyle( 0 ),
+ mnSupportedPreeditStyle( XIMPreeditCallbacks |
+ XIMPreeditNothing | XIMPreeditNone
+ /* | XIMPreeditCallbacks
+ | XIMPreeditArea
+ | XIMPreeditPosition */ ),
+ mnSupportedStatusStyle( // XIMStatusCallbacks |
+ XIMStatusNothing | XIMStatusNone
+ /* | XIMStatusCallbacks
+ | XIMStatusArea */ )
+{
+ SalI18N_InputMethod *pInputMethod;
+ pInputMethod = pFrame->maFrameData.GetDisplay()->GetInputMethod();
+ mbMultiLingual = pInputMethod->IsMultiLingual();
+
+ if ( pInputMethod->UseMethod()
+ && SupportInputMethodStyle( pInputMethod->GetSupportedStyles() ) )
+ {
+ XLIB_Window aClientWindow= pFrame->maFrameData.GetShellWindow();
+ XLIB_Window aFocusWindow= pFrame->maFrameData.GetWindow();
+ Display *pDisplay = XDisplayOfIM( pInputMethod->GetMethod() );
+
+ // for status callbacks and commit string callbacks
+ maClientData.bIsMultilingual = mbMultiLingual;
+ maClientData.eState = ePreeditStatusStartPending;
+ maClientData.pFrame = pFrame;
+ maClientData.aText.pUnicodeBuffer = NULL;
+ maClientData.aText.pCharStyle = NULL;
+ maClientData.aText.nCursorPos = 0;
+ maClientData.aText.nLength = 0;
+ maClientData.aText.nSize = 0;
+
+ // set status attributes
+ // only none and nothing are supported which do not need special
+ // arguments, area and position are just hacks, preedit callback
+ // does work but cannot be connected without unicode/multibyte
+ // support of independent vcl layer
+
+ switch ( mnStatusStyle )
+ {
+ case XIMStatusArea:
+ {
+ XRectangle *pStatusArea = new XRectangle;
+ pStatusArea->x = 0;
+ pStatusArea->y = 64;
+ pStatusArea->width = 256;
+ pStatusArea->height = 64;
+
+ mpStatusAttributes = XVaCreateNestedList (
+ 0,
+ XNAreaNeeded, pStatusArea,
+ XNArea, pStatusArea,
+ 0 );
+
+ break;
+ }
+
+ case XIMStatusNone:
+ case XIMStatusNothing:
+ default:
+
+ break;
+ }
+
+ //
+ // set preedit attributes
+ //
+
+ switch ( mnPreeditStyle )
+ {
+ case XIMPreeditCallbacks:
+
+ maPreeditCaretCallback.callback = (XIMProc)PreeditCaretCallback;
+ maPreeditStartCallback.callback = (XIMProc)PreeditStartCallback;
+ maPreeditDoneCallback.callback = (XIMProc)PreeditDoneCallback;
+ maPreeditDrawCallback.callback = (XIMProc)PreeditDrawCallback;
+ maPreeditCaretCallback.client_data = (XPointer)&maClientData;
+ maPreeditStartCallback.client_data = (XPointer)&maClientData;
+ maPreeditDoneCallback.client_data = (XPointer)&maClientData;
+ maPreeditDrawCallback.client_data = (XPointer)&maClientData;
+
+ mpPreeditAttributes = XVaCreateNestedList (
+ 0,
+ XNPreeditStartCallback, &maPreeditStartCallback,
+ XNPreeditDoneCallback, &maPreeditDoneCallback,
+ XNPreeditDrawCallback, &maPreeditDrawCallback,
+ XNPreeditCaretCallback, &maPreeditCaretCallback,
+ 0 );
+
+ break;
+
+ case XIMPreeditPosition:
+ case XIMPreeditArea:
+ {
+ XRectangle *pPreeditArea = new XRectangle;
+ XPoint *pSpotLocation = new XPoint;
+
+ pSpotLocation->x = 16;
+ pSpotLocation->y = 32;
+
+ pPreeditArea->x = 0;
+ pPreeditArea->y = 0;
+ pPreeditArea->width = 256;
+ pPreeditArea->height = 64;
+
+ mpPreeditAttributes = XVaCreateNestedList (
+ 0,
+ XNArea, pPreeditArea,
+ XNSpotLocation, pSpotLocation,
+ 0 );
+
+ break;
+ }
+
+ case XIMPreeditNone:
+ case XIMPreeditNothing:
+ default:
+
+ break;
+ }
+
+ // Create the InputContext by given it exact the information it
+ // deserves, because inappropriate attributes
+ // let XCreateIC fail on Solaris (eg. for C locale)
+
+ mpAttributes = XVaCreateNestedList(
+ 0,
+ XNFocusWindow, aFocusWindow,
+ XNClientWindow, aClientWindow,
+ XNInputStyle, mnPreeditStyle | mnStatusStyle,
+ 0 );
+
+ #ifdef SOLARIS
+ mpDisplay = pDisplay;
+ if ( 0 && (mpFontSet = p_create_fontset(mpDisplay)) != NULL )
+ {
+ mpStatusAttributes = XVaAddToNestedList( mpStatusAttributes,
+ XNFontSet, (XPointer)mpFontSet );
+ mpPreeditAttributes = XVaAddToNestedList( mpPreeditAttributes,
+ XNFontSet, (XPointer)mpFontSet );
+ }
+ #endif
+ if ( mnPreeditStyle != XIMPreeditNone )
+ {
+ #ifdef LINUX
+ if ( mpPreeditAttributes != NULL )
+ #endif
+ mpAttributes = XVaAddToNestedList( mpAttributes,
+ XNPreeditAttributes, (XPointer)mpPreeditAttributes );
+ }
+ if ( mnStatusStyle != XIMStatusNone )
+ {
+ #ifdef LINUX
+ if ( mpStatusAttributes != NULL )
+ #endif
+ mpAttributes = XVaAddToNestedList( mpAttributes,
+ XNStatusAttributes, (XPointer)mpStatusAttributes );
+ }
+ maContext = XCreateIC( pInputMethod->GetMethod(),
+ XNVaNestedList, mpAttributes,
+ NULL );
+ }
+
+ if ( maContext == NULL )
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "input context creation failed\n");
+ #endif
+
+ mbUseable = False;
+ mbMultiLingual = False;
+
+ if ( mpAttributes != NULL )
+ XFree( mpAttributes );
+ if ( mpStatusAttributes != NULL )
+ XFree( mpStatusAttributes );
+ if ( mpPreeditAttributes != NULL )
+ XFree( mpPreeditAttributes );
+ }
+
+ if ( maContext != NULL && mbMultiLingual )
+ {
+ maCommitStringCallback.callback = (XIMProc)::CommitStringCallback;
+ maCommitStringCallback.client_data = (XPointer)&maClientData;
+ XSetICValues( maContext,
+ XNCommitStringCallback, &maCommitStringCallback,
+ NULL );
+ }
+
+}
+
+// ---------------------------------------------------------------------------
+//
+// In Solaris 8 the status window does not unmap if the frame unmapps, so
+// unmap it the hard way
+//
+// ---------------------------------------------------------------------------
+
+void
+SalI18N_InputContext::Unmap()
+{
+ if ( maContext != NULL )
+ {
+ XDestroyIC( maContext );
+ maContext = NULL;
+ }
+}
+
+void
+SalI18N_InputContext::Map( SalFrame *pFrame )
+{
+ if ( (maContext == NULL) && mbUseable)
+ {
+ SalI18N_InputMethod *pInputMethod;
+ pInputMethod = pFrame->maFrameData.GetDisplay()->GetInputMethod();
+
+ maContext = XCreateIC( pInputMethod->GetMethod(),
+ XNVaNestedList, mpAttributes,
+ NULL );
+ if ( maContext != NULL && mbMultiLingual )
+ XSetICValues( maContext,
+ XNCommitStringCallback, &maCommitStringCallback,
+ NULL );
+ SetICFocus();
+ }
+}
+
+// ---------------------------------------------------------------------------
+//
+// make sure, the input method gets all the X-Events it needs, this is only
+// called once on each frame, it relys on a valid maContext
+//
+// ---------------------------------------------------------------------------
+
+void
+SalI18N_InputContext::ExtendEventMask( XLIB_Window aFocusWindow )
+{
+ unsigned long nIMEventMask;
+ XWindowAttributes aWindowAttributes;
+
+ if ( mbUseable )
+ {
+ Display *pDisplay = XDisplayOfIM( XIMOfIC(maContext) );
+
+ XGetWindowAttributes( pDisplay, aFocusWindow,
+ &aWindowAttributes );
+ XGetICValues ( maContext,
+ XNFilterEvents, &nIMEventMask,
+ NULL);
+ nIMEventMask |= aWindowAttributes.your_event_mask;
+ XSelectInput ( pDisplay, aFocusWindow, nIMEventMask );
+ }
+}
+
+// ---------------------------------------------------------------------------
+//
+// tune the styles provided by the input method with the supported one
+//
+// ---------------------------------------------------------------------------
+
+unsigned int
+SalI18N_InputContext::GetWeightingOfIMStyle( XIMStyle nStyle ) const
+{
+ struct StyleWeightingT {
+ const XIMStyle nStyle;
+ const unsigned int nWeight;
+ };
+
+ StyleWeightingT const *pWeightPtr;
+ const StyleWeightingT pWeight[] = {
+ { XIMPreeditCallbacks, 0x10000000 },
+ { XIMPreeditPosition, 0x02000000 },
+ { XIMPreeditArea, 0x01000000 },
+ { XIMPreeditNothing, 0x00100000 },
+ { XIMPreeditNone, 0x00010000 },
+ { XIMStatusCallbacks, 0x1000 },
+ { XIMStatusArea, 0x0100 },
+ { XIMStatusNothing, 0x0010 },
+ { XIMStatusNone, 0x0001 },
+ { 0, 0x0 }
+ };
+
+ int nWeight = 0;
+ for ( pWeightPtr = pWeight; pWeightPtr->nStyle != 0; pWeightPtr++ )
+ {
+ if ( (pWeightPtr->nStyle & nStyle) != 0 )
+ nWeight += pWeightPtr->nWeight;
+ }
+ return nWeight;
+}
+
+Bool
+SalI18N_InputContext::IsSupportedIMStyle( XIMStyle nStyle ) const
+{
+ if ( (nStyle & mnSupportedPreeditStyle)
+ && (nStyle & mnSupportedStatusStyle) )
+ {
+ return True;
+ }
+ return False;
+}
+
+Bool
+SalI18N_InputContext::SupportInputMethodStyle( XIMStyles *pIMStyles )
+{
+ int nBestScore = 0;
+ int nActualScore = 0;
+
+ mnPreeditStyle = 0;
+ mnStatusStyle = 0;
+
+ if ( pIMStyles != NULL )
+ {
+ // check whether the XIM supports one of the desired styles
+ // only a single preedit and a single status style must occure
+ // in a inpuut method style. Hideki said so, so i trust him
+ for ( int nStyle = 0; nStyle < pIMStyles->count_styles; nStyle++ )
+ {
+ XIMStyle nProvidedStyle = pIMStyles->supported_styles[ nStyle ];
+ if ( IsSupportedIMStyle(nProvidedStyle) )
+ {
+ nActualScore = GetWeightingOfIMStyle( nProvidedStyle );
+ if ( nActualScore >= nBestScore )
+ {
+ nBestScore = nActualScore;
+ mnPreeditStyle = nProvidedStyle & mnSupportedPreeditStyle;
+ mnStatusStyle = nProvidedStyle & mnSupportedStatusStyle;
+ }
+ }
+ }
+ }
+
+ #ifdef DEBUG
+ char pBuf[ 128 ];
+ fprintf( stderr, "selected inputmethod style = %s\n",
+ GetMethodName(mnPreeditStyle | mnStatusStyle, pBuf, sizeof(pBuf)) );
+ #endif
+
+ return (mnPreeditStyle != 0) && (mnStatusStyle != 0) ;
+}
+
+int
+SalI18N_InputContext::CommitStringCallback( sal_Unicode* pText, sal_Size nLength )
+{
+ XIMUnicodeText call_data;
+
+ call_data.string.utf16_char = pText;
+ call_data.length = nLength;
+ call_data.annotations = NULL;
+ call_data.count_annotations = 0;
+ call_data.feedback = NULL;
+
+ return ::CommitStringCallback( maContext,
+ (XPointer)&maClientData, (XPointer)&call_data );
+}
+
+// ---------------------------------------------------------------------------
+//
+// set and unset the focus for the Input Context
+// the context may be NULL despite it is useable if the framewindow is
+// in unmapped state
+//
+// ---------------------------------------------------------------------------
+
+void
+SalI18N_InputContext::SetICFocus()
+{
+ if ( mbUseable && (maContext != NULL) )
+ XSetICFocus( maContext );
+}
+
+void
+SalI18N_InputContext::UnsetICFocus()
+{
+ if ( mbUseable && (maContext != NULL) )
+ XUnsetICFocus( maContext );
+}
+
+// ---------------------------------------------------------------------------
+//
+// not used, multi byte input method only
+//
+// ---------------------------------------------------------------------------
+
+void
+SalI18N_InputContext::EndExtTextInput( USHORT nFlags )
+{
+ if ( mbUseable && (maContext != NULL) )
+ {
+ char *pPendingChars = XmbResetIC( maContext );
+
+ // text is unicode
+ if ( (pPendingChars != NULL)
+ && (nFlags & SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE) )
+ {
+ XIMUnicodeText aPendingText;
+ int nLen;
+ sal_Unicode* pPtr;
+ rtl_TextEncoding nEncoding = gsl_getSystemTextEncoding();
+
+ // buffer is already unicode
+ if ( mbMultiLingual || nEncoding == RTL_TEXTENCODING_UNICODE )
+ {
+ pPtr = (sal_Unicode*)pPendingChars;
+ for ( nLen = 0; pPtr[ nLen ] != (sal_Unicode)0; nLen++ )
+ ;
+ }
+ // else convert buffer to unicode
+ else
+ {
+ for ( nLen = 0; pPendingChars[ nLen ] != (char)0; nLen++ )
+ ;
+
+ // create text converter
+ rtl_TextToUnicodeConverter aConverter =
+ rtl_createTextToUnicodeConverter( nEncoding );
+ rtl_TextToUnicodeContext aContext =
+ rtl_createTextToUnicodeContext( aConverter );
+
+ sal_Size nBufferSize = nLen * 2;
+ sal_uInt32 nConversionInfo;
+ sal_Size nConvertedChars;
+
+ pPtr = (sal_Unicode*) alloca( nBufferSize );
+
+ // convert to single byte text stream
+ nLen = rtl_convertTextToUnicode(
+ aConverter, aContext, (char*)pPendingChars,
+ nLen, pPtr, nBufferSize,
+ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE,
+ &nConversionInfo, &nConvertedChars );
+
+ // destroy converter
+ rtl_destroyTextToUnicodeContext( aConverter, aContext );
+ rtl_destroyTextToUnicodeConverter( aConverter );
+ }
+ aPendingText.length = nLen;
+ aPendingText.string.utf16_char = pPtr;
+
+ ::CommitStringCallback( maContext,
+ (XPointer)&maClientData, (XPointer)&aPendingText );
+ }
+ if ( pPendingChars != NULL )
+ XFree ( (void*)pPendingChars );
+ }
+}
+
+
diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx
new file mode 100644
index 000000000000..04c1f9b24ca2
--- /dev/null
+++ b/vcl/unx/source/app/i18n_im.cxx
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18n_im.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+
+#include <prex.h>
+#include <X11/Xlocale.h>
+#include <X11/Xlib.h>
+#include <XIM.h>
+#include <postx.h>
+
+#include <salunx.h>
+
+#ifndef _SAL_I18N_INPUTMETHOD_HXX
+#include "i18n_im.hxx"
+#endif
+
+// -------------------------------------------------------------------------
+//
+// locale handling
+//
+// -------------------------------------------------------------------------
+
+// Locale handling of the operating system layer
+
+static char*
+SetSystemLocale( const char* p_inlocale )
+{
+ char *p_outlocale;
+ if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL )
+ {
+ fprintf( stderr,
+ "I18N: Operating system doesn't support locale \"%s\"\n",
+ p_inlocale );
+ }
+
+ return p_outlocale;
+}
+
+static Bool
+IsPosixLocale( const char* p_locale )
+{
+ if ( p_locale == NULL )
+ return False;
+ if ( (p_locale[ 0 ] == 'C') && (p_locale[ 1 ] == '\0') )
+ return True;
+ if ( strncmp(p_locale, "POSIX", sizeof("POSIX")) == 0 )
+ return True;
+
+ return False;
+}
+
+// Locale handling of the X Window System layer
+
+static Bool
+IsXWindowCompatibleLocale( const char* p_locale )
+{
+ if ( p_locale == NULL )
+ return False;
+
+ if ( !XSupportsLocale() )
+ {
+ if ( p_locale != NULL )
+ fprintf (stderr,
+ "I18N: X Window System doesn't support locale \"%s\"\n",
+ p_locale );
+ return False;
+ }
+ return True;
+}
+
+// Locale setting for the Input Method
+// allways provide a fallback, even if it means falling back to the
+// portable POSIX "C" locale
+
+Bool
+SalI18N_InputMethod::SetLocale( const char* pLocale )
+{
+ // check whether we want an Input Method engine, if we don't we
+ // do not need to set the locale
+ if ( mbUseable )
+ {
+ char *locale;
+
+ // check whether the operating system supports the LANG
+ if ( (locale = SetSystemLocale( pLocale )) == NULL )
+ {
+ if ( (locale = SetSystemLocale( "C" )) == NULL )
+ mbUseable = False;
+ }
+
+ // check whether the XWindow system supports the LANG
+ if ( !IsXWindowCompatibleLocale(locale) )
+ {
+ if ( !IsPosixLocale(locale) )
+ {
+ locale = SetSystemLocale( "C" );
+ if ( !IsXWindowCompatibleLocale(locale) )
+ mbUseable = False;
+ }
+ else
+ {
+ mbUseable = False;
+ }
+ }
+
+ // must not fail if mbUseable since XSupportsLocale() asserts success
+ if ( mbUseable && XSetLocaleModifiers("") == NULL )
+ {
+ fprintf (stderr, "I18N: Can't set X modifiers for locale \"%s\"\n",
+ locale);
+ mbUseable = False;
+ }
+ }
+
+ return mbUseable;
+}
+
+// ------------------------------------------------------------------------
+//
+// Constructor / Destructor / Initialisation
+//
+// ------------------------------------------------------------------------
+
+SalI18N_InputMethod::SalI18N_InputMethod( ) : maMethod( (XIM)NULL ),
+ mpStyles( (XIMStyles*)NULL ),
+ mbUseable( bUseInputMethodDefault ),
+ mbMultiLingual( False )
+{
+ const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" );
+ if ( pUseInputMethod != NULL )
+ mbUseable = pUseInputMethod[0] != '\0' ;
+}
+
+SalI18N_InputMethod::~SalI18N_InputMethod()
+{
+ if ( mpStyles != NULL )
+ XFree( mpStyles );
+ if ( maMethod != NULL )
+ XCloseIM ( maMethod );
+}
+
+//
+// XXX
+// debug routine: lets have a look at the provided method styles
+//
+
+#ifdef DEBUG
+
+extern "C" char*
+GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize)
+{
+ struct StyleName {
+ const XIMStyle nStyle;
+ const char *pName;
+ const int nNameLen;
+ };
+
+ StyleName *pDescPtr;
+ static const StyleName pDescription[] = {
+ { XIMPreeditArea, "PreeditArea ", sizeof("PreeditArea ") },
+ { XIMPreeditCallbacks, "PreeditCallbacks ",sizeof("PreeditCallbacks ")},
+ { XIMPreeditPosition, "PreeditPosition ", sizeof("PreeditPosition ") },
+ { XIMPreeditNothing, "PreeditNothing ", sizeof("PreeditNothing ") },
+ { XIMPreeditNone, "PreeditNone ", sizeof("PreeditNone ") },
+ { XIMStatusArea, "StatusArea ", sizeof("StatusArea ") },
+ { XIMStatusCallbacks, "StatusCallbacks ", sizeof("StatusCallbacks ") },
+ { XIMStatusNothing, "StatusNothing ", sizeof("StatusNothing ") },
+ { XIMStatusNone, "StatusNone ", sizeof("StatusNone ") },
+ { 0, "NULL", 0 }
+ };
+
+ if ( nBufSize > 0 )
+ pBuf[0] = '\0';
+
+ char *pBufPtr = pBuf;
+ for ( pDescPtr = const_cast<StyleName*>(pDescription); pDescPtr->nStyle != 0; pDescPtr++ )
+ {
+ int nSize = pDescPtr->nNameLen - 1;
+ if ( (nStyle & pDescPtr->nStyle) && (nBufSize > nSize) )
+ {
+ strncpy( pBufPtr, pDescPtr->pName, nSize + 1);
+ pBufPtr += nSize;
+ nBufSize -= nSize;
+ }
+ }
+
+ return pBuf;
+}
+
+extern "C" void
+PrintInputStyle( XIMStyles *pStyle )
+{
+ char pBuf[ 128 ];
+ int nBuf = sizeof( pBuf );
+
+ if ( pStyle == NULL )
+ fprintf( stderr, "no input method styles\n");
+ else
+ for ( int nStyle = 0; nStyle < pStyle->count_styles; nStyle++ )
+ {
+ fprintf( stderr, "style #%i = %s\n", nStyle,
+ GetMethodName(pStyle->supported_styles[nStyle], pBuf, nBuf) );
+ }
+}
+
+#endif
+
+//
+// this is the real constructing routine, since locale setting has to be done
+// prior to xopendisplay, the xopenim call has to be delayed
+//
+
+Bool
+SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
+{
+ if ( mbUseable )
+ {
+ if ( getenv("USE_XOPENIM") == NULL )
+ {
+ mbMultiLingual = True; // set ml-input flag to create input-method
+ maMethod = XvaOpenIM(pDisplay, NULL, NULL, NULL,
+ XNMultiLingualInput, mbMultiLingual, /* dummy */
+ 0);
+ // get ml-input flag from input-method
+ if ( maMethod == (XIM)NULL )
+ mbMultiLingual = False;
+ else
+ if ( XGetIMValues(maMethod,
+ XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL )
+ mbMultiLingual = False;
+ }
+ else
+ {
+ maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
+ mbMultiLingual = False;
+ }
+
+ if ( maMethod != (XIM)NULL )
+ {
+ if ( XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL)
+ != NULL)
+ mbUseable = False;
+ #ifdef DEBUG
+ fprintf(stderr, "Creating %s-Lingual InputMethod\n",
+ mbMultiLingual ? "Multi" : "Mono" );
+ PrintInputStyle( mpStyles );
+ #endif
+ }
+ else
+ {
+ mbUseable = False;
+ }
+ }
+
+ #ifdef DEBUG
+ if ( !mbUseable )
+ fprintf(stderr, "input method creation failed\n");
+ #endif
+
+ return mbUseable;
+}
+
+//
+// give IM the opportunity to look at the event, and possibly hide it
+//
+
+Bool
+SalI18N_InputMethod::FilterEvent( XEvent *pEvent )
+{
+ return mbUseable && (Bool)XFilterEvent( pEvent, None );
+}
+
+
diff --git a/vcl/unx/source/app/i18n_wrp.cxx b/vcl/unx/source/app/i18n_wrp.cxx
new file mode 100644
index 000000000000..4ad92b28d3cb
--- /dev/null
+++ b/vcl/unx/source/app/i18n_wrp.cxx
@@ -0,0 +1,293 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18n_wrp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+struct XIMArg
+{
+ char *name;
+ char *value;
+};
+
+#if !defined(LINUX)
+#include <varargs.h>
+#else
+#include <stdarg.h>
+#endif
+#include <string.h>
+#include <dlfcn.h>
+#include <X11/Xlib.h>
+#include <X11/Xlibint.h>
+#include "XIM.h"
+
+
+#ifdef SOLARIS
+#define XIIIMP_PATH "/usr/openwin/lib/locale/common/xiiimp.so.2"
+#else /* Linux */
+#define XIIIMP_PATH "/usr/lib/im/xiiimp.so.2"
+#endif
+
+/* global variables */
+static void *g_dlmodule = 0;
+
+extern "C" {
+typedef XIM (*OpenFunction)(Display*, XrmDatabase, char*, char*, XIMArg*);
+}
+
+static OpenFunction g_open_im = (OpenFunction)NULL;
+
+/* utility function to transform vararg list into an array of XIMArg */
+
+int
+XvaCountArgs( XIMArg *pInArgs )
+{
+ int nArgs = 0;
+ char *pName, *pValue;
+
+ while ( (pName = pInArgs->name) != NULL )
+ {
+ pValue = pInArgs->value;
+
+ if ( strcmp(pName, XNVaNestedList) == 0 )
+ {
+ nArgs += XvaCountArgs( (XIMArg*)pValue );
+ }
+ else
+ {
+ nArgs += 1;
+ }
+ pInArgs++;
+ }
+
+ return nArgs;
+}
+
+int
+XvaCountArgs( va_list pInArgs )
+{
+ int nArgs = 0;
+ char *pName, *pValue;
+
+ while ( (pName = va_arg(pInArgs, char*)) != NULL)
+ {
+ pValue = va_arg(pInArgs, char*);
+
+ if ( strcmp(pName, XNVaNestedList) == 0 )
+ {
+ nArgs += XvaCountArgs( (XIMArg*)pValue );
+ }
+ else
+ {
+ nArgs += 1;
+ }
+ }
+
+ return nArgs;
+}
+
+XIMArg*
+XvaGetArgs( XIMArg *pInArgs, XIMArg *pOutArgs )
+{
+ char *pName, *pValue;
+
+ while ( (pName = pInArgs->name) != NULL )
+ {
+ pValue = pInArgs->value;
+
+ if ( strcmp(pName, XNVaNestedList) == 0 )
+ {
+ pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs );
+ }
+ else
+ {
+ pOutArgs->name = pName;
+ pOutArgs->value = pValue;
+ pOutArgs++;
+ }
+ pInArgs++;
+ }
+
+ return pOutArgs;
+}
+
+void
+XvaGetArgs( va_list pInArgs, XIMArg *pOutArgs )
+{
+ char *pName, *pValue;
+
+ while ((pName = va_arg(pInArgs, char*)) != NULL)
+ {
+ pValue = va_arg(pInArgs, char*);
+
+ if ( strcmp(pName, XNVaNestedList) == 0 )
+ {
+ pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs );
+ }
+ else
+ {
+ pOutArgs->name = pName;
+ pOutArgs->value = pValue;
+ pOutArgs++;
+ }
+ }
+
+ pOutArgs->name = NULL;
+ pOutArgs->value = NULL;
+}
+
+
+/* Puplic functions */
+
+#ifdef __cplusplus
+extern "C"
+#endif
+XIM
+XvaOpenIM(Display *display, XrmDatabase rdb,
+ char *res_name, char *res_class, ...)
+{
+ XIM xim = (XIM)0;
+ va_list variable;
+ int total_count = 0;
+
+ /*
+ * so count the stuff dangling here
+ */
+
+ #ifdef LINUX
+ va_start(variable, res_class);
+ #else
+ va_start(variable);
+ #endif
+ total_count = XvaCountArgs(variable);
+ va_end(variable);
+
+ if (total_count > 0)
+ {
+ /* call a new open IM method */
+
+ XIMArg* args = (XIMArg*)Xmalloc( (total_count + 1) * sizeof(XIMArg) );
+
+ /*
+ * now package it up so we can set it along
+ */
+ #ifdef LINUX
+ va_start(variable, res_class);
+ #else
+ va_start(variable);
+ #endif
+ XvaGetArgs( variable, args );
+ va_end(variable);
+
+ if (!g_dlmodule)
+ {
+ g_dlmodule = dlopen(XIIIMP_PATH, RTLD_LAZY);
+ if (!g_dlmodule)
+ goto legacy_XIM;
+
+ g_open_im = (OpenFunction)(long)dlsym(g_dlmodule, "__XOpenIM");
+ if (!g_open_im)
+ goto legacy_XIM;
+
+ xim = (*g_open_im)(display, (XrmDatabase)rdb,
+ (char*)res_name, (char *)res_class, (XIMArg*)args);
+ }
+ else
+ {
+ goto legacy_XIM;
+ }
+ }
+
+ legacy_XIM:
+
+ if (!xim)
+ xim = XOpenIM(display, rdb, res_name, res_class);
+
+ return xim;
+}
+
+/*
+ * Close the connection to the input manager, and free the XIM structure
+ */
+
+Status
+XvaCloseIM(XIM im)
+{
+ Status s;
+ #if 0
+ XCloseIM(im);
+ s = (im->methods->close)(im); /* we can use the same close module */
+ #endif
+
+ if (!g_dlmodule)
+ {
+ /* assuming one XvaOpenIM call */
+ dlclose(g_dlmodule);
+ g_dlmodule = (void*)0;
+ g_open_im = (OpenFunction)NULL;
+ }
+ #if 0
+ if (im)
+ Xfree((char *)im);
+ #endif
+
+ return (s);
+}
+
+
+
diff --git a/vcl/unx/source/app/i18n_xkb.cxx b/vcl/unx/source/app/i18n_xkb.cxx
new file mode 100644
index 000000000000..b57abd09acc4
--- /dev/null
+++ b/vcl/unx/source/app/i18n_xkb.cxx
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18n_xkb.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#include <stdio.h>
+
+#if defined(LINUX) // should really check for xfree86 or for X11R6.1 and higher
+#define __XKeyboardExtension__ 1
+#else
+#define __XKeyboardExtension__ 0
+#endif
+
+#include <prex.h>
+#include <X11/X.h>
+#if __XKeyboardExtension__
+#include <X11/XKBlib.h>
+#endif
+#include <postx.h>
+
+#ifndef _SAL_I18N_XKBDEXTENSION_HXX
+#include "i18n_xkb.hxx"
+#endif
+
+SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display *pDisplay )
+ : mbUseExtension( (sal_Bool)__XKeyboardExtension__ ),
+ mnDefaultGroup( 0 )
+{
+ #if __XKeyboardExtension__
+
+ mpDisplay = pDisplay;
+
+ // allow user to set the default keyboard group idx or to disable the usage
+ // of x keyboard extension at all:
+ // setenv SAL_XKEYBOARDGROUP disables keyboard extension
+ // setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2
+ // keyboard group index must be in [1,4], may be specified in hex or decimal
+ static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" );
+ if ( pUseKeyboardExtension != NULL )
+ {
+ mbUseExtension = pUseKeyboardExtension[0] != '\0' ;
+ if ( mbUseExtension )
+ mnDefaultGroup = strtol( pUseKeyboardExtension, NULL, 0 );
+ if ( mnDefaultGroup > XkbMaxKbdGroup )
+ mnDefaultGroup = 0;
+ }
+
+ // query XServer support for XKB Extension,
+ // do not call XQueryExtension() / XInitExtension() due to possible version
+ // clashes !
+ if ( mbUseExtension )
+ {
+ int nMajorExtOpcode;
+ int nExtMajorVersion = XkbMajorVersion;
+ int nExtMinorVersion = XkbMinorVersion;
+
+ mbUseExtension = (sal_Bool)XkbQueryExtension( mpDisplay,
+ &nMajorExtOpcode, (int*)&mnEventBase, (int*)&mnErrorBase,
+ &nExtMajorVersion, &nExtMinorVersion );
+ }
+
+ // query notification for changes of the keyboard group
+ if ( mbUseExtension )
+ {
+ #define XkbGroupMask ( XkbGroupStateMask | XkbGroupBaseMask \
+ | XkbGroupLatchMask | XkbGroupLockMask )
+
+ mbUseExtension = XkbSelectEventDetails( mpDisplay,
+ XkbUseCoreKbd, XkbStateNotify, XkbGroupMask, XkbGroupMask );
+ }
+
+ // query initial keyboard group
+ if ( mbUseExtension )
+ {
+ XkbStateRec aStateRecord;
+ XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord );
+ mnGroup = aStateRecord.group;
+ }
+
+ #endif // __XKeyboardExtension__
+}
+
+void
+SalI18N_KeyboardExtension::Dispatch( XEvent *pEvent )
+{
+ #if __XKeyboardExtension__
+
+ // must the event be handled?
+ if ( !mbUseExtension
+ || (pEvent->type != mnEventBase) )
+ return;
+
+ // only handle state notify events for now, and only interested
+ // in group details
+ sal_uInt32 nXKBType = ((XkbAnyEvent*)pEvent)->xkb_type;
+ switch ( nXKBType )
+ {
+ case XkbStateNotify:
+
+ mnGroup = ((XkbStateNotifyEvent*)pEvent)->group;
+ break;
+
+ default:
+
+ #ifdef DEBUG
+ fprintf(stderr, "Got unrequested XkbAnyEvent %#x/%i\n",
+ nXKBType, nXKBType );
+ #endif
+ break;
+ }
+
+ #endif // __XKeyboardExtension__
+}
+
+sal_uInt32
+SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32 nKeyCode,
+ sal_uInt32 nShiftState,
+ sal_uInt32 nGroup ) const
+{
+ #if __XKeyboardExtension__
+
+ if ( !mbUseExtension )
+ return NoSymbol;
+
+ nShiftState &= ShiftMask;
+
+ KeySym nKeySymbol;
+ nKeySymbol = XkbKeycodeToKeysym( mpDisplay, nKeyCode, nGroup, nShiftState );
+ return nKeySymbol;
+
+ #else
+
+ return NoSymbol;
+
+ #endif // __XKeyboardExtension__
+}
+
+
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
new file mode 100644
index 000000000000..e08804ff371e
--- /dev/null
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -0,0 +1,545 @@
+/*************************************************************************
+ *
+ * $RCSfile: keysymnames.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef SOLARIS
+#include <prex.h>
+#include <X11/XKBlib.h>
+#include <postx.h>
+#endif
+
+#include <saldisp.hxx>
+#include <X11/keysym.h>
+
+#ifdef SOLARIS
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/kbio.h>
+#include <sys/kbd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <deflt.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#ifndef KB_USB // compile with too old headers
+#define KB_USB 6
+#endif
+#endif
+
+namespace vcl_sal {
+
+ struct KeysymNameReplacement
+ {
+ KeySym aSymbol;
+ const char* pName;
+ };
+
+ struct KeyboardReplacements
+ {
+ const char* pKeyboardName;
+ const KeysymNameReplacement* pReplacements;
+ int nReplacements;
+ rtl_TextEncoding nEncoding;
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_German[] =
+ {
+ { XK_Control_L, "Strg" },
+ { XK_Control_R, "Strg" },
+ { XK_Shift_L, "Umschalt" },
+ { XK_Shift_R, "Umschalt" },
+ { XK_Alt_L, "Alt" },
+ { XK_Alt_R, "Alt Gr" },
+ { XK_Page_Up, "Bild auf" },
+ { XK_Page_Down, "Bild ab" },
+ { XK_End, "Ende" },
+ { XK_Home, "Pos 1" },
+ { XK_Insert, "Einfg" },
+ { XK_Delete, "Entf" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Rechts" },
+ { XK_Left, "Links" },
+ { XK_Up, "Oben" },
+ { XK_Down, "Unten" },
+ { XK_BackSpace, "Rückschritt" },
+ { XK_Return, "Eingabe" },
+ { XK_slash, "Schrägstrich" },
+ { XK_space, "Leertaste" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_French[] =
+ {
+ { XK_Shift_L, "Maj" },
+ { XK_Shift_R, "Maj" },
+ { XK_Page_Up, "Pg. Préc" },
+ { XK_Page_Down, "Pg. Suiv" },
+ { XK_End, "Fin" },
+ { XK_Home, "Origine" },
+ { XK_Insert, "Insérer" },
+ { XK_Delete, "Suppr" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Droite" },
+ { XK_Left, "Gauche" },
+ { XK_Up, "Haut" },
+ { XK_Down, "Bas" },
+ { XK_BackSpace, "Ret. Arr" },
+ { XK_Return, "Retour" },
+ { XK_KP_Enter, "Entrée" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Italian[] =
+ {
+ { XK_Shift_L, "Maiusc" },
+ { XK_Shift_R, "Maiusc" },
+ { XK_Page_Up, "PgSu" },
+ { XK_Page_Down, "PgGiu" },
+ { XK_End, "Fine" },
+ { XK_Insert, "Ins" },
+ { XK_Delete, "Canc" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "A destra" },
+ { XK_Left, "A sinistra" },
+ { XK_Up, "Sposta verso l'alto" },
+ { XK_Down, "Sposta verso il basso" },
+ { XK_BackSpace, "Backspace" },
+ { XK_Return, "Invio" },
+ { XK_space, "Spaziatrice" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Dutch[] =
+ {
+ { XK_Page_Up, "PageUp" },
+ { XK_Page_Down, "PageDown" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Rechts" },
+ { XK_Left, "Links" },
+ { XK_Up, "Boven" },
+ { XK_Down, "Onder" },
+ { XK_BackSpace, "Backspace" },
+ { XK_Return, "Return" },
+ { XK_space, "Spatiebalk" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Norwegian[] =
+ {
+ { XK_Shift_L, "Skift" },
+ { XK_Shift_R, "Skift" },
+ { XK_Page_Up, "PageUp" },
+ { XK_Page_Down, "PageDown" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Hyre" },
+ { XK_Left, "Venstre" },
+ { XK_Up, "Opp" },
+ { XK_Down, "Ned" },
+ { XK_BackSpace, "Tilbake" },
+ { XK_Return, "Enter" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Swedish[] =
+ {
+ { XK_Shift_L, "Skift" },
+ { XK_Shift_R, "Skift" },
+ { XK_Page_Up, "PageUp" },
+ { XK_Page_Down, "PageDown" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Höger" },
+ { XK_Left, "Vänster" },
+ { XK_Up, "Up" },
+ { XK_Down, "Ned" },
+ { XK_BackSpace, "Backsteg" },
+ { XK_Return, "Retur" },
+ { XK_space, "Blank" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Portuguese[] =
+ {
+ { XK_Page_Up, "PageUp" },
+ { XK_Page_Down, "PageDown" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Direita" },
+ { XK_Left, "Esquerda" },
+ { XK_Up, "Acima" },
+ { XK_Down, "Abaixo" },
+ { XK_BackSpace, "Rückschritt" },
+ { XK_Return, "Eingabe" },
+ { XK_slash, "Schrägstrich" }
+ };
+
+ static const struct KeysymNameReplacement aImplReplacements_Spanish[] =
+ {
+ { XK_Shift_L, "Mayos" },
+ { XK_Shift_R, "Mayos" },
+ { XK_Page_Up, "RePág" },
+ { XK_Page_Down, "AvPág" },
+ { XK_End, "Fin" },
+ { XK_Home, "Inicio" },
+ { XK_Delete, "Supr" },
+ { XK_Escape, "Esc" },
+ { XK_Right, "Hacia la derecha" },
+ { XK_Left, "Hacia la izquierda" },
+ { XK_Up, "Hacia arriba" },
+ { XK_Down, "Hacia abajo" },
+ { XK_BackSpace, "Ret" },
+ { XK_Return, "Entrada" },
+ { XK_space, "Espacio" },
+ { XK_KP_Enter, "Intro" }
+ };
+
+ static const struct KeyboardReplacements aKeyboards[] =
+ {
+#ifdef SOLARIS
+ { "Germany5", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Germany4", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "France5", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "France6", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "France_x86", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italy5", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italy5-Hobo", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italy4", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italy6", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italy_x86", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Netherland4", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Netherland5", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Netherland5-Hobo", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Netherland6", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Netherland_x86", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norway5", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norway5-Hobo", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norway4", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norway6", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norway_x86", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portugal5", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portugal5-Hobo", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portugal4", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portugal6", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portugal_x86", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spain5", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spain5-Hobo", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spain4", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spain6", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spain_x86", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Sweden5", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Sweden5-Hobo", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Sweden4", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Sweden6", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Sweden_x86", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+#endif
+ { "German", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "French", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Norwegian", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Swedish", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Portuguese", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Spanish", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]), RTL_TEXTENCODING_ISO_8859_1 },
+ { "Italian", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]), RTL_TEXTENCODING_ISO_8859_1 }
+ };
+
+ String getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol )
+ {
+ for( int n = 0; n < sizeof(aKeyboards)/sizeof(aKeyboards[0]); n++ )
+ {
+ if( ! strcasecmp( pKeyboard, aKeyboards[n].pKeyboardName ) )
+ {
+ const struct KeysymNameReplacement* pRepl = aKeyboards[n].pReplacements;
+ for( int m = aKeyboards[n].nReplacements ; m ; )
+ {
+ if( nSymbol == pRepl[--m].aSymbol )
+ return String( pRepl[m].pName, aKeyboards[n].nEncoding );
+ }
+ }
+ }
+ return String();
+ }
+
+}
+
+#ifdef SOLARIS
+typedef struct {
+ int n_layout;
+ const char* p_description;
+} keyboard_layout;
+
+static const keyboard_layout type0_layout[] =
+{
+ { 0, "US4" },
+ { -1, NULL }
+};
+
+static const keyboard_layout type3_layout[] =
+{
+ { 0, "US3" },
+ { -1, NULL }
+};
+
+static const keyboard_layout type4_layout[] =
+{
+ { 0, "US4" },
+ { 1, "US4" },
+ { 2, "FranceBelg4" },
+ { 3, "Canada4" },
+ { 4, "Denmark4" },
+ { 5, "Germany4" },
+ { 6, "Italy4" },
+ { 7, "Netherland4" },
+ { 8, "Norway4" },
+ { 9, "Portugal4" },
+ { 10, "SpainLatAm4" },
+ { 11, "SwedenFin4" },
+ { 12, "Switzer_Fr4" },
+ { 13, "Switzer_Ge4" },
+ { 14, "UK4" },
+ { 16, "Korea4" },
+ { 17, "Taiwan4" },
+ { 19, "US101A_PC" },
+ { 19, "US101A_Sun" },
+ { 32, "Japan4" },
+ { 33, "US5" },
+ { 34, "US_UNIX5" },
+ { 35, "France5" },
+ { 36, "Denmark5" },
+ { 37, "Germany5" },
+ { 38, "Italy5" },
+ { 39, "Netherland5" },
+ { 40, "Norway5" },
+ { 41, "Portugal5" },
+ { 42, "Spain5" },
+ { 43, "Sweden5" },
+ { 44, "Switzer_Fr5" },
+ { 45, "Switzer_Ge5" },
+ { 46, "UK5" },
+ { 47, "Korea5" },
+ { 48, "Taiwan5" },
+ { 49, "Japan5" },
+ { 50, "Canada_Fr5" },
+ { 51, "Hungary5" },
+ { 52, "Poland5" },
+ { 53, "Czech5" },
+ { 54, "Russia5" },
+ { 55, "Latvia5" },
+ { 56, "Turkey5" },
+ { 57, "Greece5" },
+ { 58, "Estonia5" },
+ { 59, "Lithuania5" },
+ { 63, "Canada_Fr5_TBITS5" },
+ { 80, "US5_Hobo" },
+ { 81, "US_UNIX5_Hobo" },
+ { 82, "France5_Hobo" },
+ { 83, "Denmark5_Hobo" },
+ { 84, "Germany5_Hobo" },
+ { 85, "Italy5_Hobo" },
+ { 86, "Netherland5_Hobo" },
+ { 87, "Norway5_Hobo" },
+ { 88, "Portugal5_Hobo" },
+ { 89, "Spain5_Hobo" },
+ { 90, "Sweden5_Hobo" },
+ { 91, "Switzer_Fr5_Hobo" },
+ { 92, "Switzer_Ge5_Hobo" },
+ { 93, "UK5_Hobo" },
+ { 94, "Korea5_Hobo" },
+ { 95, "Taiwan5_Hobo" },
+ { 96, "Japan5_Hobo" },
+ { 97, "Canada_Fr5_Hobo" },
+ { -1, NULL }
+};
+
+static const keyboard_layout type101_layout[] =
+{
+ { 0, "US101A_x86" },
+ { 1, "US101A_x86" },
+ { 34, "J3100_x86" },
+ { 35, "France_x86" },
+ { 36, "Denmark_x86" },
+ { 37, "Germany_x86" },
+ { 38, "Italy_x86" },
+ { 39, "Netherland_x86" },
+ { 40, "Norway_x86" },
+ { 41, "Portugal_x86" },
+ { 42, "Spain_x86" },
+ { 43, "Sweden_x86" },
+ { 44, "Switzer_Fr_x86" },
+ { 45, "Switzer_Ge_x86" },
+ { 46, "UK_x86" },
+ { 47, "Korea_x86" },
+ { 48, "Taiwan_x86" },
+ { 49, "Japan_x86" },
+ { 50, "Canada_Fr2_x86" },
+ { 51, "Hungary_x86" },
+ { 52, "Poland_x86" },
+ { 53, "Czech_x86" },
+ { 54, "Russia_x86" },
+ { 55, "Latvia_x86" },
+ { 56, "Turkey_x86" },
+ { 57, "Greece_x86" },
+ { 59, "Lithuania_x86" },
+ { 1001, "MS_US101A_x86" },
+ { -1, NULL }
+};
+
+static const keyboard_layout type6_layout[] =
+{
+ { 0, "US6" },
+ { 6, "Denmark6" },
+ { 7, "Finnish6" },
+ { 8, "France6" },
+ { 9, "Germany6" },
+ { 14, "Italy6" },
+ { 15, "Japan6" },
+ { 16, "Korea6" },
+ { 18, "Netherland6" },
+ { 19, "Norway6" },
+ { 22, "Portugal6" },
+ { 25, "Spain6" },
+ { 26, "Sweden6" },
+ { 27, "Switzer_Fr6" },
+ { 28, "Switzer_Ge6" },
+ { 30, "Taiwan6" },
+ { 32, "UK6" },
+ { 33, "US6" },
+ { -1, NULL }
+};
+#endif
+
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+const char* SalDisplay::GetKeyboardName( BOOL bRefresh )
+{
+ if( bRefresh || ! m_aKeyboardName.Len() )
+ {
+#ifdef SOLARIS
+ if( IsLocal() )
+ {
+ int kbd = open( "/dev/kbd", O_RDONLY );
+ if( kbd >= 0 )
+ {
+ int kbd_type = 0;
+ if( ! ioctl( kbd, KIOCTYPE, &kbd_type ) )
+ {
+ int kbd_layout = 0;
+ if( ! ioctl( kbd, KIOCLAYOUT, &kbd_layout ) )
+ {
+ const keyboard_layout *p_layout = NULL;
+ switch( kbd_type )
+ {
+ case KB_KLUNK: p_layout = type0_layout; break;
+ case KB_SUN3: p_layout = type3_layout; break;
+ case KB_SUN4: p_layout = type4_layout; break;
+ case KB_USB: p_layout = type6_layout; break;
+ case KB_PC: p_layout = type101_layout; break;
+ }
+
+ if( p_layout )
+ {
+ while( p_layout->n_layout != -1 )
+ {
+ if ( p_layout->n_layout == kbd_layout )
+ {
+ m_aKeyboardName = p_layout->p_description;
+ break;
+ }
+ p_layout++;
+ }
+ }
+ }
+ }
+ }
+ }
+#else
+ int opcode, event, error;
+ int major = XkbMajorVersion, minor = XkbMinorVersion;
+ if( ! m_aKeyboardName.Len() &&
+ XSalIsDisplay( GetDisplay() ) &&
+ XkbQueryExtension( GetDisplay(), &opcode, &event,&error, &major, &minor ) )
+ {
+ XkbDescPtr pXkbDesc = NULL;
+ // try X keyboard extension
+ if( pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd ) )
+ {
+ const char* pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] );
+ m_aKeyboardName = pAtom;
+ XFree( (void*)pAtom );
+
+#ifdef DEBUG
+#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: <nil>\n", #x ); }
+
+ PRINT_ATOM( keycodes );
+ PRINT_ATOM( geometry );
+ PRINT_ATOM( symbols );
+ PRINT_ATOM( types );
+ PRINT_ATOM( compat );
+ PRINT_ATOM( phys_symbols );
+
+ int i;
+ for( i = 0; i < XkbNumVirtualMods; i++ )
+ PRINT_ATOM( vmods[i] );
+ for( i = 0; i < XkbNumIndicators; i++ )
+ PRINT_ATOM( indicators[i] );
+ for( i = 0; i < XkbNumKbdGroups; i++ )
+ PRINT_ATOM( groups[i] );
+#endif
+ XkbFreeKeyboard( pXkbDesc, 0, True );
+ }
+ }
+#endif
+ }
+ return m_aKeyboardName.GetBuffer();
+}
diff --git a/vcl/unx/source/app/makefile.mk b/vcl/unx/source/app/makefile.mk
new file mode 100644
index 000000000000..c532bcd1a836
--- /dev/null
+++ b/vcl/unx/source/app/makefile.mk
@@ -0,0 +1,142 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=vcl
+TARGET=salapp
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(OS)"=="MACOSX"
+
+dummy:
+ @echo "Nothing to build for Mac OS X"
+
+.ELSE # "$(OS)"=="MACOSX"
+
+.IF "$(remote)"==""
+OBJFILES=\
+ $(OBJ)$/salmain.obj
+
+SLOFILES=\
+ $(SLO)$/i18n_cb.obj \
+ $(SLO)$/i18n_ic.obj \
+ $(SLO)$/i18n_im.obj \
+ $(SLO)$/i18n_xkb.obj \
+ $(SLO)$/i18n_wrp.obj \
+ $(SLO)$/salmain.obj \
+ $(SLO)$/saldata.obj \
+ $(SLO)$/saltimer.obj \
+ $(SLO)$/saldisp.obj \
+ $(SLO)$/salinst.obj \
+ $(SLO)$/salsound2.obj \
+ $(SLO)$/audioconvert.obj \
+ $(SLO)$/osssound.obj \
+ $(SLO)$/devaudiosound.obj \
+ $(SLO)$/rptpsound.obj \
+ $(SLO)$/nassound.obj \
+ $(SLO)$/salsys.obj \
+ $(SLO)$/soicon.obj \
+ $(SLO)$/sm.obj \
+ $(SLO)$/stacktrace.obj \
+ $(SLO)$/keysymnames.obj
+
+.IF "$(OS)$(CPU)" == "SOLARISS"
+.IF "$(COM)"!="GCC"
+SLOFILES+=$(SLO)$/getfpsols.obj
+.ENDIF # "$(COM)"!="GCC"
+.ELIF "$(OS)$(CPU)" == "SOLARISI"
+SLOFILES+=$(SLO)$/getfpsoli.obj
+.ENDIF
+
+.ELSE
+SLOFILES=\
+ $(SLO)$/salmain.obj
+.ENDIF
+
+.IF "$(remote)"!=""
+EXCEPTIONSFILES=$(SLO)$/salmain.obj \
+ $(OBJ)$/salmain.obj
+.ENDIF
+
+.ENDIF # "$(OS)"=="MACOSX"
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+$(SLO)$/getfpsols.obj: getfpsols.s
+ CC -c -o $(SLO)$/getfpsols.o getfpsols.s && touch $(SLO)$/getfpsols.obj
+
+$(SLO)$/getfpsoli.obj: getfpsoli.s
+ CC -c -o $(SLO)$/getfpsoli.o getfpsoli.s && touch $(SLO)$/getfpsoli.obj
+
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
new file mode 100644
index 000000000000..4519e75fd56f
--- /dev/null
+++ b/vcl/unx/source/app/saldata.cxx
@@ -0,0 +1,854 @@
+/*************************************************************************
+ *
+ * $RCSfile: saldata.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALDATA_CXX
+
+#ifdef USE_XTOOLKIT
+# define SAL_XT
+#endif
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <errno.h>
+#include <pthread.h>
+#include <sys/resource.h>
+#ifdef SUN
+#include <sys/systeminfo.h>
+#endif
+#ifdef AIX
+#include <strings.h>
+#endif
+
+#include <prex.h>
+#include <X11/Shell.h>
+#include <X11/Xproto.h>
+#include <postx.h>
+
+#ifndef _VOS_MUTEX_HXX
+#include <vos/mutex.hxx>
+#endif
+
+#include <salunx.h>
+
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _OSL_SIGNAL_H_
+#include <osl/signal.h>
+#endif
+#ifndef _OSL_THREAD_H_
+#include <osl/thread.h>
+#endif
+#ifndef _OSL_PROCESS_H_
+#include <osl/process.h>
+#endif
+
+#include <tools/debug.hxx>
+
+#ifndef _SAL_I18N_INPUTMETHOD_HXX
+#include "i18n_im.hxx"
+#endif
+#ifndef _SAL_I18N_XKBDEXTENSION_HXX
+#include "i18n_xkb.hxx"
+#endif
+
+// -=-= <signal.h> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#ifndef UNX
+#ifndef SIGBUS
+#define SIGBUS 10
+#endif
+#ifndef SIGSEGV
+#define SIGSEGV 11
+#endif
+#ifndef SIGIOT
+#define SIGIOT SIGABRT
+#endif
+#endif
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static const struct timeval noyield = { 0, 0 };
+static const struct timeval yield = { 0, 10000 };
+static const struct fd_set ZeroFDS = { 0 };
+static const char* XRequest[] = {
+ // see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ...
+ NULL,
+ "X_CreateWindow",
+ "X_ChangeWindowAttributes",
+ "X_GetWindowAttributes",
+ "X_DestroyWindow",
+ "X_DestroySubwindows",
+ "X_ChangeSaveSet",
+ "X_ReparentWindow",
+ "X_MapWindow",
+ "X_MapSubwindows",
+ "X_UnmapWindow",
+ "X_UnmapSubwindows",
+ "X_ConfigureWindow",
+ "X_CirculateWindow",
+ "X_GetGeometry",
+ "X_QueryTree",
+ "X_InternAtom",
+ "X_GetAtomName",
+ "X_ChangeProperty",
+ "X_DeleteProperty",
+ "X_GetProperty",
+ "X_ListProperties",
+ "X_SetSelectionOwner",
+ "X_GetSelectionOwner",
+ "X_ConvertSelection",
+ "X_SendEvent",
+ "X_GrabPointer",
+ "X_UngrabPointer",
+ "X_GrabButton",
+ "X_UngrabButton",
+ "X_ChangeActivePointerGrab",
+ "X_GrabKeyboard",
+ "X_UngrabKeyboard",
+ "X_GrabKey",
+ "X_UngrabKey",
+ "X_AllowEvents",
+ "X_GrabServer",
+ "X_UngrabServer",
+ "X_QueryPointer",
+ "X_GetMotionEvents",
+ "X_TranslateCoords",
+ "X_WarpPointer",
+ "X_SetInputFocus",
+ "X_GetInputFocus",
+ "X_QueryKeymap",
+ "X_OpenFont",
+ "X_CloseFont",
+ "X_QueryFont",
+ "X_QueryTextExtents",
+ "X_ListFonts",
+ "X_ListFontsWithInfo",
+ "X_SetFontPath",
+ "X_GetFontPath",
+ "X_CreatePixmap",
+ "X_FreePixmap",
+ "X_CreateGC",
+ "X_ChangeGC",
+ "X_CopyGC",
+ "X_SetDashes",
+ "X_SetClipRectangles",
+ "X_FreeGC",
+ "X_ClearArea",
+ "X_CopyArea",
+ "X_CopyPlane",
+ "X_PolyPoint",
+ "X_PolyLine",
+ "X_PolySegment",
+ "X_PolyRectangle",
+ "X_PolyArc",
+ "X_FillPoly",
+ "X_PolyFillRectangle",
+ "X_PolyFillArc",
+ "X_PutImage",
+ "X_GetImage",
+ "X_PolyText8",
+ "X_PolyText16",
+ "X_ImageText8",
+ "X_ImageText16",
+ "X_CreateColormap",
+ "X_FreeColormap",
+ "X_CopyColormapAndFree",
+ "X_InstallColormap",
+ "X_UninstallColormap",
+ "X_ListInstalledColormaps",
+ "X_AllocColor",
+ "X_AllocNamedColor",
+ "X_AllocColorCells",
+ "X_AllocColorPlanes",
+ "X_FreeColors",
+ "X_StoreColors",
+ "X_StoreNamedColor",
+ "X_QueryColors",
+ "X_LookupColor",
+ "X_CreateCursor",
+ "X_CreateGlyphCursor",
+ "X_FreeCursor",
+ "X_RecolorCursor",
+ "X_QueryBestSize",
+ "X_QueryExtension",
+ "X_ListExtensions",
+ "X_ChangeKeyboardMapping",
+ "X_GetKeyboardMapping",
+ "X_ChangeKeyboardControl",
+ "X_GetKeyboardControl",
+ "X_Bell",
+ "X_ChangePointerControl",
+ "X_GetPointerControl",
+ "X_SetScreenSaver",
+ "X_GetScreenSaver",
+ "X_ChangeHosts",
+ "X_ListHosts",
+ "X_SetAccessControl",
+ "X_SetCloseDownMode",
+ "X_KillClient",
+ "X_RotateProperties",
+ "X_ForceScreenSaver",
+ "X_SetPointerMapping",
+ "X_GetPointerMapping",
+ "X_SetModifierMapping",
+ "X_GetModifierMapping",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "X_NoOperation"
+};
+
+BEGIN_C
+// -=-= C statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+
+static oslSignalAction SalSignalHdl (void* pData, oslSignalInfo* pInfo)
+{
+ ULONG nException = 0;
+
+ switch (pInfo->Signal)
+ {
+ case osl_Signal_System :
+ return osl_Signal_ActCallNextHdl;
+ case osl_Signal_Terminate :
+ if (!GetSalData()->Close())
+ return osl_Signal_ActIgnore;
+ break;
+ case osl_Signal_User :
+ return osl_Signal_ActCallNextHdl;
+ default: break;
+ }
+
+ return osl_Signal_ActAbortApp;
+}
+
+
+final static int sal_XErrorHdl( Display *pDisplay, XErrorEvent *pEvent )
+{
+ GetSalData()->XError( pDisplay, pEvent );
+ return 0;
+}
+
+final static int sal_XIOErrorHdl( Display *pDisplay )
+{
+ SalData *pSalData = GetSalData();
+ SalDisplay *pSalDisplay = pSalData->GetDisplay( pDisplay );
+ if ( pDisplay && pSalDisplay->IsDisplay() )
+ pSalData->GetLib()->Remove( ConnectionNumber( pDisplay ) );
+
+ oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ // einen XIOError kann man nicht ignorieren. Die Connection ist
+ // zusammengebrochen, hier kann man nur noch halbwegs sinnvoll runterfahren
+
+ fprintf( stderr, "X IO Error\n" );
+ fflush( stdout );
+ fflush( stderr );
+ exit(0);
+ return 0;
+}
+
+final static void sal_XtErrorHdl( XLIB_String sMsg )
+{
+#ifdef DBG_UTIL
+ fprintf( stderr, "X Toolkit Error: %s\n", sMsg );
+#endif
+ fflush( stdout );
+ fflush( stderr );
+ abort();
+}
+
+final static void sal_XtWarningHdl( XLIB_String sMsg )
+{
+#ifdef DBG_UTIL
+ fprintf( stderr, "X Toolkit Warning: %s\n", sMsg );
+ fflush( stdout );
+ fflush( stderr );
+#endif
+}
+
+END_C
+
+// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <pthread.h>
+
+final SalData::SalData()
+{
+ argv_ = 0;
+ argc_ = 0;
+
+ pTimerProc_ = 0;
+
+ memset( sig_, 0, sizeof( sig_ ) ); // SIG_DFL
+ bNoExceptions_ = !!getenv( "SAL_NOSEGV" );
+
+ pXLib_ = new SalXLib();
+ pDefDisp_ = 0;
+ pCurDisp_ = 0;
+
+ hMainThread_ = pthread_self();
+
+ pFirstInstance_ = NULL;
+ pFirstFrame_ = NULL;
+}
+
+final SalData::~SalData()
+{
+ delete pXLib_;
+}
+
+final long SalData::Close() const
+{
+ signal( SIGTERM, sig_[SIGTERM] );
+ if( !pFirstFrame_ )
+ return 1;
+
+ SalFrame *pFrame = pFirstFrame_;
+ while( pFrame )
+ {
+ if( !pFrame->maFrameData.Close() )
+ return 0;
+ pFrame = pFrame->maFrameData.GetNextFrame();
+ }
+ return 1;
+}
+
+final long SalData::ShutDown() const
+{
+ if( !pFirstFrame_ )
+ return 1;
+
+ SalFrame *pFrame = pFirstFrame_;
+ while( pFrame )
+ {
+ if( !pFrame->maFrameData.ShutDown() )
+ return 0;
+ pFrame = pFrame->maFrameData.GetNextFrame();
+ }
+ return 1;
+}
+
+final XubString SalData::GetCommandLineParam( USHORT nParam ) const
+{
+ if( !nParam ) { return aBinaryPath_; }
+ if( nParam >= argc_ ) return String();
+ return String( argv_[nParam], gsl_getSystemTextEncoding() );
+}
+
+final SalDisplay *SalData::GetDisplay( Display *pDisplay )
+{
+ SalDisplay *pSalDisplay = SalDisplays_.First();
+ while( pSalDisplay && pSalDisplay->GetDisplay() != pDisplay )
+ pSalDisplay = SalDisplays_.Next();
+ return pSalDisplay;
+}
+
+void SalData::Init( int *pArgc, char *ppArgv[] )
+{
+ // Pfad zum Executable bestimmen
+ char aFilePath[ PATH_MAX ];
+ ::rtl::OUString aPath;
+ osl_getExecutableFile( &aPath.pData );
+
+ aBinaryPath_ = aPath;
+
+ pXLib_->Init( pArgc, ppArgv );
+
+ argc_ = *pArgc;
+ argv_ = ppArgv;
+}
+
+
+// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalXLib::SalXLib()
+{
+ pApplicationContext_ = NULL;
+ Timeout_.tv_sec = 0;
+ Timeout_.tv_usec = 0;
+ nTimeoutMS_ = 0;
+ bWasXError_ = FALSE;
+ bIgnoreXErrors_ = !!getenv( "SAL_IGNOREXERRORS" );
+ nStateOfYield_ = 0;
+ nFDs_ = 0;
+ pReadFDS_ = new fd_set;
+ pExceptionFDS_ = new fd_set;
+ FD_ZERO( pReadFDS_ );
+ FD_ZERO( pExceptionFDS_ );
+}
+
+final SalXLib::~SalXLib()
+{
+ delete pReadFDS_;
+ delete pExceptionFDS_;
+
+// completetly disabled Bug Nr. #47319 -> segv while using xsuntransport=shmem
+// #ifdef SAL_XT
+// XtDestroyApplicationContext( pApplicationContext_ );
+// #endif
+}
+
+static char sDISPLAY___[30];
+final void SalXLib::Init( int *pArgc, char *ppArgv[] )
+{
+ SalData *pSalData = GetSalData();
+ SalI18N_InputMethod* pInputMethod = new SalI18N_InputMethod;
+
+ pInputMethod->SetLocale();
+
+ if( !getenv( "DISPLAY" ) )
+ putenv( "DISPLAY=:0" );
+
+ XtSetLanguageProc( NULL, NULL, NULL );
+ XtToolkitInitialize();
+ XrmInitialize();
+ pApplicationContext_ = XtCreateApplicationContext();
+
+ Display *pDisp = XtOpenDisplay( pApplicationContext_,
+ NULL,
+ NULL,
+ "VCL",
+ NULL,
+ 0,
+ pArgc,
+ ppArgv );
+
+ if( !pDisp )
+ {
+ char *pDisplayString = getenv ("DISPLAY");
+
+ fprintf( stderr, "%s: cannot open display \"%s\"\n",
+ ppArgv[0],
+ pDisplayString ? pDisplayString : ":0.0" );
+ fprintf( stderr, "Please check your \"DISPLAY\" environment variable, as well as the permissions to access that display ");
+ fprintf( stderr, "(See \"man X\" resp. \"man xhost\" for details)\n");
+ fflush ( stderr );
+ exit (0);
+ }
+
+ XVisualInfo aVI;
+ Colormap aColMap;
+ int nScreen = DefaultScreen( pDisp );
+
+ if( SalDisplay::BestVisual( pDisp, nScreen, aVI ) ) // DefaultVisual
+ aColMap = DefaultColormap( pDisp, nScreen );
+ else
+ aColMap = XCreateColormap( pDisp,
+ RootWindow( pDisp, nScreen ),
+ aVI.visual,
+ AllocNone );
+
+ Arg aArgs[10];
+ int nArgs = 0;
+ XtSetArg( aArgs[nArgs], XtNvisual, aVI.visual ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNdepth, aVI.depth ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNcolormap, aColMap ); nArgs++;
+
+ Widget wInitWidget = XtAppCreateShell( NULL,
+ "SAL",
+ applicationShellWidgetClass,
+ pDisp,
+ aArgs, nArgs );
+
+
+ XSetIOErrorHandler ( (XIOErrorHandler)sal_XIOErrorHdl );
+ XSetErrorHandler ( (XErrorHandler)sal_XErrorHdl );
+
+ XtAppSetErrorHandler ( GetAppContext(),
+ (XtErrorHandler)sal_XtErrorHdl );
+ XtAppSetWarningHandler( GetAppContext(),
+ (XtErrorHandler)sal_XtWarningHdl );
+
+ SalDisplay *pSalDisplay = new SalDisplay( wInitWidget );
+
+ pInputMethod->CreateMethod( pDisp );
+ pSalDisplay->SetInputMethod( pInputMethod );
+
+ sal_Bool bOldErrorSetting = GetIgnoreXErrors();
+ SetIgnoreXErrors( True );
+ SalI18N_KeyboardExtension *pKbdExtension = new SalI18N_KeyboardExtension( pDisp );
+ XSync( pDisp, False );
+
+ pKbdExtension->UseExtension( ! WasXError() );
+ SetIgnoreXErrors( bOldErrorSetting );
+
+ pSalDisplay->SetKbdExtension( pKbdExtension );
+
+#if 0 // ! USE_XTOOLKIT
+
+ SalDisplay *pSalDisplay = new SalDisplay( pDisp, aVI.visual, aColMap );
+
+#endif
+}
+
+extern "C" {
+void EmitFontpathWarning( void )
+{
+ static Bool bOnce = False;
+ if ( !bOnce )
+ {
+ bOnce = True;
+ fprintf( stderr, "Please verify your fontpath settings\n"
+ "\t(See \"man xset\" for details"
+ " or ask your system administrator)\n" );
+ }
+}
+
+} /* extern "C" */
+
+final void SalXLib::XError( Display *pDisplay, XErrorEvent *pEvent )
+{
+ char msg[ 120 ];
+
+ if( ! bIgnoreXErrors_ )
+ {
+#if defined DEBUG || defined DBG_UTIL
+ XGetErrorText( pDisplay, pEvent->error_code, msg, sizeof( msg ) );
+ fprintf( stderr, "X-Error: %s\n", msg );
+ if( pEvent->request_code > capacityof( XRequest ) )
+ fprintf( stderr, "\tMajor opcode: %d (Shm?)\n", pEvent->request_code );
+ else if( XRequest[pEvent->request_code] )
+ fprintf( stderr, "\tMajor opcode: %d (%s)\n",
+ pEvent->request_code, XRequest[pEvent->request_code] );
+ else
+ fprintf( stderr, "\tMajor opcode: %d (BadRequest?)\n", pEvent->request_code );
+ fprintf( stderr, "\tResource ID: 0x%lx\n",
+ pEvent->resourceid );
+ fprintf( stderr, "\tSerial No: %ld (%ld)\n",
+ pEvent->serial, LastKnownRequestProcessed(pDisplay) );
+
+ fflush( stdout );
+ fflush( stderr );
+#endif
+
+ oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ switch (eToDo)
+ {
+ case osl_Signal_ActIgnore :
+ return;
+ case osl_Signal_ActAbortApp :
+ abort();
+ case osl_Signal_ActKillApp :
+ exit(0);
+ case osl_Signal_ActCallNextHdl :
+ break;
+ default :
+ break;
+ }
+
+ if ( (pEvent->error_code == BadAlloc)
+ && (pEvent->request_code == X_OpenFont) )
+ {
+ static Bool bOnce = False;
+ if ( !bOnce )
+ {
+ fprintf(stderr, "X-Error occured in a request for X_OpenFont\n");
+ EmitFontpathWarning();
+
+ bOnce = True ;
+ }
+ }
+ else
+ {
+ abort();
+ }
+ }
+
+ bWasXError_ = TRUE;
+}
+
+#define MAX_NUM_DESCRIPTORS 128
+
+struct YieldEntry
+{
+ YieldEntry* next; // pointer to next entry
+ int fd; // file descriptor for reading
+ void* data; // data for predicate and callback
+ YieldFunc pending; // predicate (determins pending events)
+ YieldFunc queued; // read and queue up events
+ YieldFunc handle; // handle pending events
+
+ inline int HasPendingEvent() const { return pending( fd, data ); }
+ inline int IsEventQueued() const { return queued( fd, data ); }
+ inline void HandleNextEvent() const { handle( fd, data ); }
+};
+
+#define MAX_NUM_DESCRIPTORS 128
+
+static YieldEntry yieldTable[ MAX_NUM_DESCRIPTORS ];
+
+void SalXLib::Insert( int nFD, void* data,
+ YieldFunc pending,
+ YieldFunc queued,
+ YieldFunc handle )
+{
+ DBG_ASSERT( nFD, "can not insert stdin descriptor" )
+ DBG_ASSERT( !yieldTable[nFD].fd, "SalXLib::Insert fd twice" )
+
+ yieldTable[nFD].fd = nFD;
+ yieldTable[nFD].data = data;
+ yieldTable[nFD].pending = pending;
+ yieldTable[nFD].queued = queued;
+ yieldTable[nFD].handle = handle;
+
+ FD_SET( nFD, pReadFDS_ );
+ FD_SET( nFD, pExceptionFDS_ );
+
+ if( nFD >= nFDs_ )
+ nFDs_ = nFD + 1;
+}
+
+void SalXLib::Remove( int nFD )
+{
+ FD_CLR( nFD, pReadFDS_ );
+ FD_CLR( nFD, pExceptionFDS_ );
+
+ yieldTable[nFD].fd = 0;
+
+ if ( nFD == nFDs_ )
+ {
+ for ( nFD = nFDs_ - 1;
+ nFD >= 0 && !yieldTable[nFD].fd;
+ nFD-- );
+
+ nFDs_ = nFD + 1;
+ }
+}
+
+class YieldMutexReleaser
+{
+ ULONG m_nYieldCount;
+ SalYieldMutex* m_pSalInstYieldMutex;
+public:
+ YieldMutexReleaser();
+ ~YieldMutexReleaser();
+};
+
+YieldMutexReleaser::YieldMutexReleaser()
+{
+ SalData *pSalData = GetSalData();
+ m_pSalInstYieldMutex =
+ pSalData->pFirstInstance_->maInstData.mpSalYieldMutex;
+
+ ULONG i;
+ if ( m_pSalInstYieldMutex->GetThreadId() ==
+ NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ {
+ m_nYieldCount = m_pSalInstYieldMutex->GetAcquireCount();
+ for ( i = 0; i < m_nYieldCount; i++ )
+ m_pSalInstYieldMutex->release();
+ }
+ else
+ m_nYieldCount = 0;
+}
+
+YieldMutexReleaser::~YieldMutexReleaser()
+{
+ // Yield-Semaphore wieder holen
+ while ( m_nYieldCount )
+ {
+ m_pSalInstYieldMutex->acquire();
+ m_nYieldCount--;
+ }
+}
+
+final void SalXLib::Yield( BOOL bWait )
+{
+ fd_set ReadFDS;
+ fd_set ExceptionFDS;
+ int nFound = 0;
+
+ nStateOfYield_ = 0; // is not 0 if we are recursive called
+
+ // first look for queued events
+ for ( int nFD = 0; nFD < nFDs_; nFD++ )
+ {
+ YieldEntry* pEntry = &(yieldTable[nFD]);
+ if ( pEntry->fd )
+ {
+ DBG_ASSERT( nFD == pEntry->fd, "wrong fd in Yield()" );
+
+ if ( pEntry->HasPendingEvent() )
+ {
+ pEntry->HandleNextEvent();
+ // #63862# da jetzt alle user-events ueber die interne
+ // queue kommen, wird die Kontrolle analog zum select
+ // gesteuerten Zweig einmal bei bWait abgegeben
+ YieldMutexReleaser aReleaser;
+ if ( bWait )
+ osl_yieldThread();
+ return;
+ }
+ }
+ }
+
+ // next select with or without timeout according to bWait
+
+ ReadFDS = *pReadFDS_;
+ ExceptionFDS = *pExceptionFDS_;
+
+ struct timeval Timeout;
+ Timeout = bWait ? yield : noyield;
+
+ nStateOfYield_ = 1;
+
+ {
+ // Yield-Semaphore freigeben
+ YieldMutexReleaser aReleaser;
+ if( bWait )
+ osl_yieldThread();
+#if defined (HPUX) && defined (CMA_UX)
+ nFound = select( nFDs_, (int*)&ReadFDS, (int*)NULL,
+ (int*)&ExceptionFDS, &Timeout );
+#else
+ nFound = select( nFDs_, &ReadFDS, NULL, &ExceptionFDS, &Timeout );
+#endif
+ }
+ if( nFound < 0 ) // error
+ {
+#ifdef DBG_UTIL
+ fprintf( stderr, "SalXLib::Yield s=%d e=%d f=%d\n",
+ nStateOfYield_, errno, nFound );
+#endif
+ nStateOfYield_ = 0;
+ if( EINTR == errno )
+ {
+ errno = 0;
+ }
+ }
+
+ // check for timeouts
+ if( Timeout_.tv_sec ) // timer is started
+ {
+ gettimeofday( &Timeout, NULL );
+
+ if( Timeout >= Timeout_ )
+ {
+ Timeout_ = Timeout + nTimeoutMS_;
+ GetSalData()->Timeout();
+ }
+ }
+
+ // handle events
+ if( nFound > 0 )
+ {
+ // now we are in the protected section !
+ // recall select if we have acquired fd's, ready for reading,
+
+ struct timeval noTimeout = { 0, 0 };
+ nFound = select( nFDs_, &ReadFDS, NULL,
+ &ExceptionFDS, &noTimeout );
+
+ // someone-else has done the job for us
+ if (nFound == 0)
+ {
+ nStateOfYield_ = 0;
+ //if ( !pthread_equal (pthread_self(),
+ // pSalData->GetMainThread()))
+ return;
+ }
+
+ for ( int nFD = 0; nFD < nFDs_; nFD++ )
+ {
+ YieldEntry* pEntry = &(yieldTable[nFD]);
+ if ( pEntry->fd )
+ {
+ if ( FD_ISSET( nFD, &ExceptionFDS ) ) {
+#if defined DEBUG
+ fprintf( stderr, "SalXLib::Yield exception\n" );
+#endif
+ nFound--;
+ }
+ if ( FD_ISSET( nFD, &ReadFDS ) )
+ {
+ nStateOfYield_ = 3;
+ if ( pEntry->IsEventQueued() )
+ {
+ nStateOfYield_ = 4;
+ pEntry->HandleNextEvent();
+ // if a recursive call has done the job
+ // so abort here
+ if ( nStateOfYield_ != 4 )
+ break;
+ }
+ nFound--;
+ }
+ }
+ }
+ }
+ nStateOfYield_ = 0;
+}
+
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
new file mode 100644
index 000000000000..5c7ca51b0a6b
--- /dev/null
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -0,0 +1,3653 @@
+/*************************************************************************
+ *
+ * $RCSfile: saldisp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALDISP_CXX
+
+#define SAL_XT
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <string.h>
+
+#ifdef __SunOS_5_5_1
+extern "C" { int gethostname(char*,int); }
+#endif
+
+#include <prex.h>
+#include <X11/cursorfont.h>
+#include "nodrop_curs.h"
+#include "nodrop_mask.h"
+#include "wait_curs.h"
+#include "wait_mask.h"
+#include "hsplit_curs.h"
+#include "hsplit_mask.h"
+#include "vsplit_curs.h"
+#include "vsplit_mask.h"
+#include "neswsize_curs.h"
+#include "neswsize_mask.h"
+#include "nwsesize_curs.h"
+#include "nwsesize_mask.h"
+#include "magnify_curs.h"
+#include "magnify_mask.h"
+#include "rotate_curs.h"
+#include "rotate_mask.h"
+#include "hshear_curs.h"
+#include "hshear_mask.h"
+#include "vshear_curs.h"
+#include "vshear_mask.h"
+#include "drawline_curs.h"
+#include "drawline_mask.h"
+#include "drawrect_curs.h"
+#include "drawrect_mask.h"
+#include "drawpolygon_curs.h"
+#include "drawpolygon_mask.h"
+#include "drawbezier_curs.h"
+#include "drawbezier_mask.h"
+#include "drawarc_curs.h"
+#include "drawarc_mask.h"
+#include "drawpie_curs.h"
+#include "drawpie_mask.h"
+#include "drawcirclecut_curs.h"
+#include "drawcirclecut_mask.h"
+#include "drawellipse_curs.h"
+#include "drawellipse_mask.h"
+#include "drawconnect_curs.h"
+#include "drawconnect_mask.h"
+#include "drawtext_curs.h"
+#include "drawtext_mask.h"
+#include "mirror_curs.h"
+#include "mirror_mask.h"
+#include "crook_curs.h"
+#include "crook_mask.h"
+#include "crop_curs.h"
+#include "crop_mask.h"
+#include "move_curs.h"
+#include "move_mask.h"
+#include "movepoint_curs.h"
+#include "movepoint_mask.h"
+#include "movebezierweight_curs.h"
+#include "movebezierweight_mask.h"
+#include "drawfreehand_curs.h"
+#include "drawfreehand_mask.h"
+#include "drawcaption_curs.h"
+#include "drawcaption_mask.h"
+#include "movedata_curs.h"
+#include "movedata_mask.h"
+#include "copydata_curs.h"
+#include "copydata_mask.h"
+#include "linkdata_curs.h"
+#include "linkdata_mask.h"
+#include "movedlnk_curs.h"
+#include "movedlnk_mask.h"
+#include "copydlnk_curs.h"
+#include "copydlnk_mask.h"
+#include "movefile_curs.h"
+#include "movefile_mask.h"
+#include "copyfile_curs.h"
+#include "copyfile_mask.h"
+#include "linkfile_curs.h"
+#include "linkfile_mask.h"
+#include "moveflnk_curs.h"
+#include "moveflnk_mask.h"
+#include "copyflnk_curs.h"
+#include "copyflnk_mask.h"
+#include "movefiles_curs.h"
+#include "movefiles_mask.h"
+#include "copyfiles_curs.h"
+#include "copyfiles_mask.h"
+
+#include "chart_curs.h"
+#include "chart_mask.h"
+#include "detective_curs.h"
+#include "detective_mask.h"
+#include "pivotcol_curs.h"
+#include "pivotcol_mask.h"
+#include "pivotfld_curs.h"
+#include "pivotfld_mask.h"
+#include "pivotrow_curs.h"
+#include "pivotrow_mask.h"
+
+#include "chain_curs.h"
+#include "chain_mask.h"
+#include "chainnot_curs.h"
+#include "chainnot_mask.h"
+
+#include "timemove_curs.h"
+#include "timemove_mask.h"
+#include "timesize_curs.h"
+#include "timesize_mask.h"
+
+#include "ase_curs.h"
+#include "ase_mask.h"
+#include "asn_curs.h"
+#include "asn_mask.h"
+#include "asne_curs.h"
+#include "asne_mask.h"
+#include "asns_curs.h"
+#include "asns_mask.h"
+#include "asnswe_curs.h"
+#include "asnswe_mask.h"
+#include "asnw_curs.h"
+#include "asnw_mask.h"
+#include "ass_curs.h"
+#include "ass_mask.h"
+#include "asse_curs.h"
+#include "asse_mask.h"
+#include "assw_curs.h"
+#include "assw_mask.h"
+#include "asw_curs.h"
+#include "asw_mask.h"
+#include "aswe_curs.h"
+#include "aswe_mask.h"
+#include "null_curs.h"
+#include "null_mask.h"
+
+#include "airbrush_curs.h"
+#include "airbrush_mask.h"
+#include "fill_curs.h"
+#include "fill_mask.h"
+
+#include "invert50.h"
+#if !(defined S390 || defined AIX)
+#include <X11/extensions/XShm.h>
+#endif
+#include <X11/keysym.h>
+
+#ifdef USE_XMU
+#include <X11/Xmu/Atoms.h>
+#include <X11/Xmu/SysUtil.h>
+#endif
+#include <X11/Xatom.h>
+#include <postx.h>
+
+#include <salunx.h>
+
+#ifndef _SAL_I18N_INPUTMETHOD_HXX
+#include "i18n_im.hxx"
+#endif
+#ifndef _SAL_I18N_XKBDEXTENSION_HXX
+#include "i18n_xkb.hxx"
+#endif
+
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _SV_KEYCODES_HXX
+#include <keycodes.hxx>
+#endif
+#ifndef _SV_SALBTYPE_HXX
+#include <salbtype.hxx>
+#endif
+#ifndef _SV_SALBMP_HXX
+#include <salbmp.hxx>
+#endif
+#ifndef _SV_SALSYS_HXX
+#include <salsys.hxx>
+#endif
+#ifndef _SV_DTINT_HXX
+#include <dtint.hxx>
+#endif
+#ifndef _SV_SALOGL_HXX
+#include <salogl.hxx>
+#endif
+#ifndef _OSL_THREADMUTEX_H_
+#include <osl/mutex.h>
+#endif
+#ifndef _SV_SALOBJ_HXX
+#include <salobj.hxx>
+#endif
+#ifndef _VCL_SM_HXX
+#include <sm.hxx>
+#endif
+
+#include <osl/socket.h>
+#include <rtl/ustring>
+
+// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#define PSEUDOCOLOR12
+#define PSEUDOCOLOR8
+#define TRUECOLOR24
+#define TRUECOLOR16
+#define TRUECOLOR15
+#define TRUECOLOR12
+#define TRUECOLOR8
+
+#define SALCOLOR_WHITE MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF )
+#define SALCOLOR_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 )
+
+// -=-= Prototyps =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+EXTERN_C int XShmGetEventBase( Display* );
+
+// -=-= static variables -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static const char* const VisualClassName[] = {
+ "StaticGray",
+ "GrayScale",
+ "StaticColor",
+ "PseudoColor",
+ "TrueColor",
+ "DirectColor"
+};
+
+static const char* const AtomStrings[] =
+{
+ "WM_PROTOCOLS", // window manager
+ "WM_STATE",
+ "WM_DELETE_WINDOW",
+ "WM_SAVE_YOURSELF",
+ "WM_COMMAND",
+
+ "SAL_QUITEVENT", // client message events
+ "SAL_USEREVENT",
+};
+
+static const char* const EventNames[] =
+{
+ NULL,
+ NULL,
+ "KeyPress",
+ "KeyRelease",
+ "ButtonPress",
+ "ButtonRelease",
+ "MotionNotify",
+ "EnterNotify",
+ "LeaveNotify",
+ "FocusIn",
+ "FocusOut",
+ "KeymapNotify",
+ "Expose",
+ "GraphicsExpose",
+ "NoExpose",
+ "VisibilityNotify",
+ "CreateNotify",
+ "DestroyNotify",
+ "UnmapNotify",
+ "MapNotify",
+ "MapRequest",
+ "ReparentNotify",
+ "ConfigureNotify",
+ "ConfigureRequest",
+ "GravityNotify",
+ "ResizeRequest",
+ "CirculateNotify",
+ "CirculateRequest",
+ "PropertyNotify",
+ "SelectionClear",
+ "SelectionRequest",
+ "SelectionNotify",
+ "ColormapNotify",
+ "ClientMessage",
+ "MappingNotify"
+};
+
+static UINT32 nIn___, nOut___;
+
+// -=-= global inline =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+inline const char *Null( const char *p ) { return p ? p : ""; }
+inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); }
+inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); }
+
+#ifdef USE_XMU
+final inline const char *GetAtomName( Display *d, Atom a )
+{ return Null( XmuGetAtomName( d, a ) ); }
+#else
+final inline const char *GetAtomName( Display *d, Atom a )
+{ return Null( XGetAtomName( d, a ) ); }
+#endif
+
+final inline double Hypothenuse( long w, long h )
+{ return sqrt( (w*w)+(h*h) ); }
+
+final inline int ColorDiff( int r, int g, int b )
+{ return (r*r)+(g*g)+(b*b); }
+
+final inline int ColorDiff( SalColor c1, int r, int g, int b )
+{ return ColorDiff( (int)SALCOLOR_RED (c1)-r,
+ (int)SALCOLOR_GREEN(c1)-g,
+ (int)SALCOLOR_BLUE (c1)-b ); }
+
+// -=-= global functions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static int sal_Shift( Pixel nMask )
+{
+ int i = 24;
+ if( nMask < 0x00010000 ) { nMask <<= 16; i -= 16; }
+ if( nMask < 0x01000000 ) { nMask <<= 8; i -= 8; }
+ if( nMask < 0x10000000 ) { nMask <<= 4; i -= 4; }
+ if( nMask < 0x40000000 ) { nMask <<= 2; i -= 2; }
+ if( nMask < 0x80000000 ) { nMask <<= 1; i -= 1; }
+ return i;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
+{
+ int nInfos;
+ XVisualInfo aTemplate;
+ XVisualInfo*pInfos;
+
+ aTemplate.visualid = nVID;
+
+ pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos );
+ if( !pInfos )
+ return FALSE;
+
+ rVI = *pInfos;
+ XFree( pInfos );
+
+ DBG_ASSERT( rVI.visualid == nVID,
+ "sal_GetVisualInfo: could not get correct visual by visualId" )
+ return TRUE;
+}
+
+// ---------------------------------------------------------------------------
+
+// check wether displaystring is in format N.M or N. or just N
+// with N and M beeing natural numbers
+static BOOL
+sal_IsDisplayNumber( const char *pDisplayString )
+{
+ if ( ! isdigit(*pDisplayString) )
+ return FALSE;
+ while ( isdigit(*(++pDisplayString)) )
+ ; /* do nothing */
+
+ if ( *pDisplayString == '.' )
+ {
+ while ( isdigit(*(++pDisplayString)) )
+ ; /* do nothing */
+ }
+
+ return (*pDisplayString == '\0');
+}
+
+// check whether host1 and host2 point to the same ip address
+static BOOL
+sal_EqualHosts( const ::rtl::OUString& Host1, const ::rtl::OUString& Host2)
+{
+ oslSocketAddr pHostAddr1;
+ oslSocketAddr pHostAddr2;
+ BOOL bEqualAddress;
+
+ if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' )
+ pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 );
+ else
+ pHostAddr1 = osl_resolveHostname( Host1.pData );
+
+ if ( Host2.toChar() >= '0' && Host2.toChar() <= '9' )
+ pHostAddr2 = osl_createInetSocketAddr( Host2.pData, 0 );
+ else
+ pHostAddr2 = osl_resolveHostname( Host2.pData );
+
+ bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? TRUE : FALSE;
+
+ osl_destroySocketAddr( pHostAddr1 );
+ osl_destroySocketAddr( pHostAddr2 );
+
+ return bEqualAddress;
+}
+
+static BOOL
+sal_IsLocalDisplay( Display *pDisplay )
+{
+ const char *pDisplayString = DisplayString( pDisplay );
+
+ // no string, no idea
+ if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0')
+ return FALSE;
+
+ // check for ":x.y"
+ if ( pDisplayString[ 0 ] == ':' )
+ return sal_IsDisplayNumber( pDisplayString + 1 );
+
+ // check for fixed token which all mean localhost:x.y
+ const char pLocal[] = "localhost:";
+ const int nLocalLen = sizeof(pLocal) - 1;
+ if ( strncmp(pDisplayString, pLocal, nLocalLen) == 0 )
+ return sal_IsDisplayNumber( pDisplayString + nLocalLen );
+
+ const char pUnix[] = "unix:";
+ const int nUnixLen = sizeof(pUnix) - 1;
+ if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 )
+ return sal_IsDisplayNumber( pDisplayString + nUnixLen );
+
+ const char pLoopback[] = "127.0.0.1:";
+ const int nLoopbackLen= sizeof(pLoopback) - 1;
+ if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 )
+ return sal_IsDisplayNumber( pDisplayString + nLoopbackLen );
+
+ // compare local hostname to displaystring, both may be ip address or
+ // hostname
+ BOOL bEqual = FALSE;
+ char *pDisplayHost = strdup( pDisplayString );
+ char *pPtr = strrchr( pDisplayHost, ':' );
+
+ if( pPtr != NULL )
+ {
+ ::rtl::OUString aLocalHostname;
+ if( osl_getLocalHostname( &aLocalHostname.pData ) == osl_Socket_Ok)
+ {
+ *pPtr = '\0';
+ ::rtl::OUString aDisplayHostname( pDisplayHost, strlen( pDisplayHost ), gsl_getSystemTextEncoding() );
+ bEqual = sal_EqualHosts( aLocalHostname, aDisplayHostname );
+ bEqual = bEqual && sal_IsDisplayNumber( pPtr + 1 );
+ }
+ }
+ free( pDisplayHost );
+
+ return bEqual;
+}
+
+// ---------------------------------------------------------------------------
+// IsLocal means soffice is running on the same host as the xserver
+// since it is not called very often and sal_IsLocalDisplay() is relative
+// expensive bLocal_ is initialized on first call
+
+BOOL SalDisplay::IsLocal()
+{
+ if ( ! mbLocalIsValid )
+ {
+ bLocal_ = sal_IsLocalDisplay( pDisp_ );
+ mbLocalIsValid = TRUE;
+ }
+ return (BOOL)bLocal_;
+}
+
+// ---------------------------------------------------------------------------
+extern "C" srv_vendor_t
+sal_GetServerVendor( Display *p_display )
+{
+ typedef struct {
+ srv_vendor_t e_vendor; // vendor as enum
+ char *p_name; // vendor name as returned by VendorString()
+ unsigned int n_len; // number of chars to compare
+ } vendor_t;
+
+ const vendor_t p_vendorlist[] = {
+ { vendor_xfree, "The XFree86 Project, Inc", 13 },
+ { vendor_sun, "Sun Microsystems, Inc.", 10 },
+ { vendor_attachmate, "Attachmate Corporation", 10 },
+ { vendor_excursion,
+ "DECWINDOWS DigitalEquipmentCorporation, eXcursion", 42 },
+ { vendor_hp, "Hewlett-Packard Company", 17 },
+ { vendor_hummingbird, "Hummingbird Communications Ltd.", 11 },
+ { vendor_ibm, "International Business Machines", 24 },
+ { vendor_sgi, "Silicon Graphics", 9 },
+ { vendor_sco, "The Santa Cruz Operation", 16 },
+ { vendor_xinside, "X Inside Inc.", 10 },
+ // allways the last entry: vendor_none to indicate eol
+ { vendor_none, NULL, 0 },
+ };
+
+ // handle xprinter separately, since it doesn´t implement ServerVendor()
+ if ( ! XSalIsDisplay( p_display ) )
+ return vendor_xprinter;
+
+ // handle regular server vendors
+ char *p_name = ServerVendor( p_display );
+ vendor_t *p_vendor;
+ for (p_vendor = const_cast<vendor_t*>(p_vendorlist); p_vendor->e_vendor != vendor_none; p_vendor++)
+ {
+ if ( strncmp (p_name, p_vendor->p_name, p_vendor->n_len) == 0 )
+ return p_vendor->e_vendor;
+ }
+
+ // vendor not found in list
+ return vendor_unknown;
+}
+
+// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final BOOL SalDisplay::BestVisual( Display *pDisplay,
+ int nScreen,
+ XVisualInfo &rVI )
+{
+ VisualID nDefVID = XVisualIDFromVisual( DefaultVisual( pDisplay, nScreen ) );
+ VisualID nVID = 0;
+ char *pVID = getenv( "SAL_VISUAL" );
+ if( pVID )
+ sscanf( pVID, "%li", &nVID );
+
+ if( nVID && sal_GetVisualInfo( pDisplay, nVID, rVI ) )
+ return rVI.visualid == nDefVID;
+
+ XVisualInfo aVI;
+ // get all visuals
+ int nVisuals;
+ XVisualInfo* pVInfos = XGetVisualInfo( pDisplay, VisualNoMask,
+ &aVI, &nVisuals );
+ // pVInfos should contain at least one visual, otherwise
+ // we're in trouble
+ int* pWeight = new int[ nVisuals ];
+ int i;
+ for( i = 0; i < nVisuals; i++ )
+ {
+ BOOL bUsable = FALSE;
+ int nTrueColor = 1;
+
+ if ( pVInfos[i].screen != nScreen )
+ {
+ bUsable = FALSE;
+ }
+ else
+ if( pVInfos[i].c_class == TrueColor )
+ {
+ nTrueColor = 2048;
+ if( pVInfos[i].depth == 24 )
+ bUsable = TRUE;
+#ifdef TRUECOLOR8
+ else if( pVInfos[i].depth == 8 )
+ {
+ nTrueColor = -1; // strongly discourage 8 bit true color
+ bUsable = TRUE;
+ }
+#endif
+#ifdef TRUECOLOR15
+ else if( pVInfos[i].depth == 15 )
+ bUsable = TRUE;
+#endif
+#ifdef TRUECOLOR16
+ else if( pVInfos[i].depth == 16 )
+ bUsable = TRUE;
+#endif
+#ifdef TRUECOLOR32
+ else if( pVInfos[i].depth == 32 )
+ {
+ nTrueColor = 256;
+ // we do not have use for an alpha channel
+ // better use a 24 or 16 bit truecolor visual if possible
+ bUsable = TRUE;
+ }
+#endif
+ }
+ else if( pVInfos[i].c_class == PseudoColor )
+ {
+ if( pVInfos[i].depth <= 8 )
+ bUsable = TRUE;
+#ifdef PSEUDOCOLOR12
+ else if( pVInfos[i].depth == 12 )
+ bUsable = TRUE;
+#endif
+ }
+ pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024;
+ pWeight[ i ] -= pVInfos[ i ].visualid;
+ }
+
+ SalOpenGL::MakeVisualWeights( pDisplay, pVInfos, pWeight, nVisuals );
+
+ int nBestVisual = 0;
+ int nBestWeight = -1024;
+ for( i = 0; i < nVisuals; i++ )
+ {
+ if( pWeight[ i ] > nBestWeight )
+ {
+ nBestWeight = pWeight[ i ];
+ nBestVisual = i;
+ }
+ }
+
+ rVI = pVInfos[ nBestVisual ];
+
+ XFree( pVInfos );
+ return rVI.visualid == nDefVID;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+final SalDisplay::SalDisplay( Widget w )
+{
+ SalData *pSalData = GetSalData();
+
+ if( !pSalData->GetDefDisp() )
+ pSalData->SetDefDisp( this );
+ if( !pSalData->GetCurDisp() )
+ pSalData->SetCurDisp( this );
+
+ pXLib_ = pSalData->GetLib();
+ pDisp_ = XtDisplay( w );
+ nScreen_ = DefaultScreen( pDisp_ );
+ hShell_ = w;
+ hComposite_ = XtVaCreateManagedWidget(
+ "ShellComposite",
+ SAL_COMPOSITE_WIDGET,
+ hShell_,
+ NULL );
+
+ Visual *pVisual = NULL;
+ Colormap hColMap = None;
+ Arg aArgs[10];
+
+ XtSetArg( aArgs[0], XtNvisual, &pVisual );
+ XtSetArg( aArgs[1], XtNcolormap, &hColMap );
+
+ XtGetValues( hShell_, aArgs, 2 );
+ if( !pVisual )
+ pVisual = DefaultVisual( pDisp_, nScreen_ );
+ if (!hColMap)
+ hColMap = DefaultColormap( pDisp_, nScreen_ );
+ if( !IsDisplay() && !hColMap)
+ hColMap = 1; // trick for XPrinter
+
+ XVisualInfo aXVI;
+ sal_GetVisualInfo( pDisp_, XVisualIDFromVisual( pVisual ), aXVI );
+
+ Init( hColMap, &aXVI );
+}
+
+final SalDisplay::SalDisplay( Display *display, Visual *pVisual,
+ Colormap aColMap ) : pDisp_( display )
+{
+ SalData *pSalData = GetSalData();
+ XVisualInfo aXVI;
+
+ if( !pSalData->GetDefDisp() )
+ pSalData->SetDefDisp( this );
+ if( !pSalData->GetCurDisp() )
+ pSalData->SetCurDisp( this );
+
+ pXLib_ = XSalIsDisplay( pDisp_ ) ? pSalData->GetLib() : NULL;
+ nScreen_ = DefaultScreen( pDisp_ );
+
+ if (!aColMap)
+ aColMap = DefaultColormap( display, nScreen_ );
+ if( !IsDisplay() && !aColMap)
+ aColMap = 1; // trick for XPrinter
+ if (!pVisual)
+ pVisual = DefaultVisual( pDisp_, nScreen_ );
+
+ sal_GetVisualInfo( pDisp_, XVisualIDFromVisual( pVisual ), aXVI );
+ Init( aColMap, &aXVI );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalDisplay::~SalDisplay( )
+{
+ SalData *pSalData = GetSalData();
+
+ SalBitmap::ImplDestroyCache();
+ DestroyFontCache();
+
+ if( IsDisplay() )
+ {
+ osl_destroyMutex( hEventGuard_ );
+
+ XDestroyWindow( pDisp_, hRefWindow_ );
+ if( pMonoGC_ != pCopyGC_ )
+ XFreeGC( pDisp_, pMonoGC_ );
+ XFreeGC( pDisp_, pCopyGC_ );
+ XFreeGC( pDisp_, pAndInvertedGC_ );
+ XFreeGC( pDisp_, pAndGC_ );
+ XFreeGC( pDisp_, pOrGC_ );
+ XFreeGC( pDisp_, pStippleGC_ );
+ XFreePixmap( pDisp_, hInvert50_ );
+
+ hEventGuard_ = (oslMutex)ILLEGAL_POINTER;
+ hRefWindow_ = (XLIB_Window)ILLEGAL_POINTER;
+ pMonoGC_ = (GC)ILLEGAL_POINTER;
+ pCopyGC_ = (GC)ILLEGAL_POINTER;
+ pAndInvertedGC_ = (GC)ILLEGAL_POINTER;
+ pAndGC_ = (GC)ILLEGAL_POINTER;
+ pOrGC_ = (GC)ILLEGAL_POINTER;
+ pStippleGC_ = (GC)ILLEGAL_POINTER;
+ hInvert50_ = None;
+
+ for( size_t i = 0; i < POINTER_COUNT; i++ )
+ {
+ XFreeCursor( pDisp_, aPointerCache_[i] );
+#ifdef DBG_UTIL
+ aPointerCache_[i] = None;
+#endif
+ }
+
+ if( hComposite_ )
+ XtDestroyWidget( hComposite_ );
+ if( hShell_ )
+ XtDestroyWidget( hShell_ );
+
+ pXLib_->Remove( ConnectionNumber( pDisp_ ) );
+
+ delete mpInputMethod;
+ delete mpKbdExtension;
+ XtCloseDisplay( pDisp_ );
+ }
+
+ pDisp_ = (Display*)ILLEGAL_POINTER;
+
+ pSalData->Remove( this );
+
+ // free colormap before modifying pVisual_
+ xColor_.Clear();
+
+ delete pICCCM_;
+ delete pVisual_;
+
+ if( pRootVisual_ != pVisual_ )
+ delete pRootVisual_;
+
+ pICCCM_ = (SalICCCM*)ILLEGAL_POINTER;
+ pVisual_ = (SalVisual*)ILLEGAL_POINTER;
+ pRootVisual_ = (SalVisual*)ILLEGAL_POINTER;
+
+ if( pSalData->GetDefDisp() == this )
+ pSalData->SetDefDisp( NULL );
+ if( pSalData->GetCurDisp() == this )
+ pSalData->SetCurDisp( NULL );
+}
+
+static int DisplayHasEvent( int fd, SalDisplay *pDisplay )
+{
+ DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ "wrong fd in DisplayHasEvent" )
+ return pDisplay->IsDisplay() && pDisplay->IsEvent();
+}
+static int DisplayQueue( int fd, SalDisplay *pDisplay )
+{
+ DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ "wrong fd in DisplayHasEvent" )
+ return XEventsQueued( pDisplay->GetDisplay(),
+ QueuedAfterReading );
+}
+static int DisplayYield( int fd, SalDisplay *pDisplay )
+{
+ DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ "wrong fd in DisplayHasEvent" )
+ pDisplay->Yield( TRUE );
+ return TRUE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalDisplay::Init( Colormap hXColmap, const XVisualInfo* pXVI )
+{
+ GetSalData()->Insert( this );
+
+ for( size_t i = 0; i < POINTER_COUNT; i++ )
+ aPointerCache_[i] = None;
+
+ eWindowManager_ = otherwm;
+ nProperties_ = PROPERTY_DEFAULT;
+ nStateOfYield_ = 0;
+ nStateOfSendEvent_ = 0;
+ hEventGuard_ = NULL;
+ pEventQueue_ = NULL;
+ pDispatchStack_ = NULL;
+ pFontCache_ = NULL;
+ mpFontList = (XlfdStorage*)NULL;
+ mpFactory = (AttributeProvider*)NULL;
+ mpCvtCache = NULL;
+ pCapture_ = NULL;
+ pVisual_ = new SalVisual( pXVI );
+ aSize_ = Size( DisplayWidth ( pDisp_, nScreen_ ),
+ DisplayHeight( pDisp_, nScreen_ ) );
+ aResolution_ =
+ Pair( DPI( aSize_.Width(), DisplayWidthMM ( pDisp_, nScreen_ ) ),
+ DPI( aSize_.Height(), DisplayHeightMM( pDisp_, nScreen_ ) ) );
+
+ nMaxRequestSize_ = XExtendedMaxRequestSize( pDisp_ ) * 4;
+ if( !nMaxRequestSize_ )
+ nMaxRequestSize_ = XMaxRequestSize( pDisp_ ) * 4;
+
+ SetServerVendor();
+ SalBitmap::ImplCreateCache();
+
+ if( IsDisplay() )
+ {
+ hEventGuard_ = osl_createMutex();
+
+ pXLib_->Insert( ConnectionNumber( pDisp_ ),
+ this,
+ (YieldFunc) DisplayHasEvent,
+ (YieldFunc) DisplayQueue,
+ (YieldFunc) DisplayYield );
+
+ pICCCM_ = new SalICCCM( this );
+ pScreen_ = ScreenOfDisplay( pDisp_, nScreen_ );
+ hRootWindow_ = RootWindowOfScreen( pScreen_ );
+
+ // we are interested in create and destroy notify events
+ // for salsystem
+ if( hRootWindow_ != None )
+ XSelectInput( pDisp_, hRootWindow_, SubstructureNotifyMask );
+
+ bLocal_ = FALSE; /* dont care, initialize later by
+ calling SalDisplay::IsLocal() */
+ mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */
+
+ // - - - - - - - - - - Visuals - - - - - - - - - - - - - - -
+ Visual *pRootVisual = DefaultVisual( pDisp_, nScreen_ );
+ // if( pRootVisual != pXVI->visual )
+ if( pRootVisual->visualid != pVisual_->GetVisualId() )
+ {
+ XVisualInfo aXVI;
+ sal_GetVisualInfo( pDisp_, pRootVisual->visualid, aXVI );
+ pRootVisual_ = new SalVisual( &aXVI );
+ }
+ else
+ pRootVisual_ = pVisual_;
+
+ // start session management
+ SessionManagerClient::open();
+
+ // - - - - - - - - - - Reference Window/Default Drawable - -
+ XSetWindowAttributes aXWAttributes;
+ aXWAttributes.border_pixel = 0;
+ aXWAttributes.background_pixel = 0;
+ aXWAttributes.colormap = hXColmap;
+ hRefWindow_ = XCreateWindow( pDisp_,
+ hRootWindow_,
+ 0,0, 16,16, 0,
+ pVisual_->GetDepth(),
+ InputOutput,
+ pVisual_->GetVisual(),
+ CWBorderPixel|CWBackPixel|CWColormap,
+ &aXWAttributes );
+
+ // set client leader and session id
+ char* pSessionID = SessionManagerClient::getSessionID();
+ if( hRefWindow_ )
+ {
+ if( pSessionID )
+ {
+ XChangeProperty( pDisp_,
+ hRefWindow_,
+ XInternAtom( pDisp_, "SM_CLIENT_ID", False ),
+ XA_STRING,
+ 8,
+ PropModeReplace,
+ (unsigned char*)pSessionID,
+ strlen( pSessionID )
+ );
+ }
+ // client leader must have WM_CLIENT_LEADER pointing to itself
+
+ XChangeProperty( pDisp_,
+ hRefWindow_,
+ XInternAtom( pDisp_, "WM_CLIENT_LEADER", False ),
+ XA_WINDOW,
+ 32,
+ PropModeReplace,
+ (unsigned char*)&hRefWindow_,
+ 1
+
+ );
+
+ ByteString aExec( SessionManagerClient::getExecName(), gsl_getSystemTextEncoding() );
+ char* argv[2];
+ argv[0] = "/bin/sh";
+ argv[1] = const_cast<char*>(aExec.GetBuffer());
+ XSetCommand( pDisp_, hRefWindow_, argv, 2 );
+ }
+
+ // - - - - - - - - - - Synchronize - - - - - - - - - - - - -
+ if( getenv( "SAL_SYNCHRONIZE" ) )
+ XSynchronize( pDisp_, True );
+
+ // - - - - - - - - - - Window Manager - - - - - - - - - - -
+ const char *pWM = getenv( "SAL_WM" );
+ if( pWM )
+ sscanf( pWM, "%li", &eWindowManager_ );
+ else if( XInternAtom( pDisp_, "_SGI_TELL_WM", True ) )
+ eWindowManager_ = _4Dwm;
+ else if( XInternAtom( pDisp_, "KWM_RUNNING", True ) )
+ eWindowManager_ = mwm; // naja, eigentlich kwm ...
+ else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) )
+ eWindowManager_ = olwm;
+
+ // - - - - - - - - - - Properties - - - - - - - - - - - - -
+ const char *pProperties = getenv( "SAL_PROPERTIES" );
+ if( pProperties )
+ sscanf( pProperties, "%li", &nProperties_ );
+ else
+ {
+#if defined DBG_UTIL || defined SUN || defined LINUX
+ nProperties_ |= PROPERTY_FEATURE_Maximize;
+#endif
+ // Server Bugs & Properties
+ if( GetServerVendor() == vendor_excursion )
+ {
+ nProperties_ |= PROPERTY_BUG_Stipple;
+ nProperties_ |= PROPERTY_BUG_DrawLine;
+ nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask;
+ }
+ else
+ if( GetServerVendor() == vendor_attachmate )
+ {
+ nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel;
+ }
+ else
+ if( GetServerVendor() == vendor_ibm )
+ {
+ nProperties_ |= PROPERTY_BUG_XA_FAMILY_NAME_nil;
+
+ if( otherwm == eWindowManager_ ) eWindowManager_ = mwm;
+ }
+ else
+ if( GetServerVendor() == vendor_xfree )
+ {
+ nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor;
+#ifdef ARM32 // ??? Server! nicht Client ???
+ nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask;
+#endif
+#ifdef LINUX
+ // otherwm and olwm are a kind of default, which are not detected
+ // carefully. if we are running linux (i.e. not netbsd) on an xfree
+ // display, fvwm is most probable the wm to choose, confusing with mwm
+ // doesn't harm. #57791# start maximized if possible
+ if( (otherwm == eWindowManager_)
+ || (olwm == eWindowManager_ ))
+ {
+ eWindowManager_ = fvwm; // ???
+ nProperties_ |= PROPERTY_FEATURE_Maximize;
+ }
+#else
+ if( otherwm == eWindowManager_ ) eWindowManager_ = winmgr;
+#endif
+#if defined SOLARIS && defined SPARC
+ nProperties_ |= PROPERTY_BUG_Bitmap_Bit_Order;
+ // solaris xlib seems to have problems with putting images
+ // in correct bit order to xfree 8 bit displays
+#endif
+ }
+ else
+ if( GetServerVendor() == vendor_sun )
+ {
+ // nicht alle! (bekannt: nur Sparc II CG3, CG6?)
+ nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask;
+
+ // Fehler im Sun-Solaris X86 Server !
+ if (ImageByteOrder(GetDisplay()) == LSBFirst)
+ {
+ nProperties_ |= PROPERTY_BUG_Tile;
+ nProperties_ |= PROPERTY_SUPPORT_3ButtonMouse;
+ }
+ else // MSBFirst Sun-Solaris Sparc Server
+ {
+ // XCopyPlane reverts black and white for 1bit bitmaps
+ // only sun, only 8bit pseudocolor target
+ if ( (pVisual_->GetDepth() == 8)
+ && (pVisual_->GetClass() == PseudoColor))
+ nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel;
+ // Fehler in Solaris 2.5.1
+ if (VendorRelease ( GetDisplay() ) < 3600)
+ nProperties_ |= PROPERTY_BUG_FillPolygon_Tile;
+ }
+
+ if( otherwm == eWindowManager_ )
+ if( XInternAtom( pDisp_, "_MOTIF_WM_INFO", True ) )
+ eWindowManager_ = dtwm;
+ else
+ eWindowManager_ = olwm;
+ }
+ else
+ if( GetServerVendor() == vendor_sco )
+ {
+ if( otherwm == eWindowManager_ ) eWindowManager_ = pmwm;
+ }
+ else
+ if( GetServerVendor() == vendor_sgi )
+ {
+ if( pVisual_->GetDepth() > 8 && pVisual_->GetDepth() <= 16 )
+ nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor;
+ nProperties_ |= PROPERTY_SUPPORT_XSetClipMask;
+
+ if( otherwm == eWindowManager_ ) eWindowManager_ = _4Dwm;
+ }
+ else
+ if( GetServerVendor() == vendor_hp )
+ {
+ if( otherwm == eWindowManager_ ) eWindowManager_ = dtwm;
+ }
+ else
+ if( GetServerVendor() == vendor_hummingbird )
+ {
+ if (pVisual_->GetDepth() == 24)
+ nProperties_ |= PROPERTY_BUG_CopyArea_OnlySmallSlices;
+ }
+
+ if( otherwm == eWindowManager_ )
+ {
+ if( !XInternAtom( pDisp_, "_MOTIF_WM_INFO", True ) )
+ eWindowManager_ = olwm;
+ // ???
+ }
+
+ if( winmgr == eWindowManager_ )
+ {
+ nProperties_ &= ~PROPERTY_SUPPORT_WM_SetPos;
+ nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen;
+ nProperties_ |= PROPERTY_FEATURE_Maximize;
+ }
+ else if( dtwm == eWindowManager_ )
+ {
+ nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
+ }
+ else if( pmwm == eWindowManager_ )
+ {
+ nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
+ }
+ }
+
+ // - - - - - - - - - - Shared Images - - - - - - - - - - - -
+#if defined _XSHM_H_ // && defined DBG_UTIL
+ // SharedMem wird nur noch ueber SalProperties enabled
+ // wegen Bugs #47289 und #46512
+
+ if( ( nProperties_ & PROPERTY_FEATURE_SharedMemory )
+ && ( *DisplayString( pDisp_ ) == ':'
+ || !strncmp( DisplayString( pDisp_ ), "localhost:", 10 ))
+ )
+ {
+ int nMinor, nMajor;
+ Bool bPixmaps;
+
+ nSharedImages_ = XShmQueryVersion( pDisp_,
+ &nMajor,
+ &nMinor,
+ &bPixmaps )
+ ? 0x80000000 : 0;
+ }
+ else
+ nSharedImages_ = 0;
+#else
+ nSharedImages_ = 0;
+#endif
+ // - - - - - - - - - - Images - - - - - - - - - - - - - - -
+ nImageDepths_ = 0x00000000;
+ int nCount, *pDepths = XListDepths( pDisp_, nScreen_, &nCount );
+ if( pDepths )
+ {
+ for( int i = 0; i < nCount; i++ )
+ nImageDepths_ |= 1 << (pDepths[i]-1);
+ XFree( pDepths );
+ }
+ }
+ else
+ {
+ pICCCM_ = NULL;
+ pScreen_ = NULL;
+ hRootWindow_ = None;
+ pRootVisual_ = pVisual_;
+#ifdef DBG_UTIL
+ hRefWindow_ = (XLIB_Window)ILLEGAL_POINTER;
+#endif
+ hInvert50_ = None;
+ bLocal_ = TRUE; /* always true for xprinter */
+ mbLocalIsValid = TRUE; /* yes bLocal_ is initialized */
+ nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask; //XPrinter doesnt
+ nSharedImages_ = 0;
+ nImageDepths_ = 0xFFFFFFFF;
+ }
+
+ // - - - - - - - - - - Images - - - - - - - - - - - - - - -
+ // 0x8080C889
+ nImageDepths_ &= (1<<(32-1))
+ |(1<<(24-1))
+ |(1<<(16-1))
+ |(1<<(15-1))
+ |(1<<(12-1))
+ |(1<<(8-1))
+ |(1<<(4-1))
+ |(1<<(1-1));
+
+ xColor_ = new SalColormap( this, hXColmap );
+
+ // - - - - - - - - - - GCs - - - - - - - - - - - - - - - - -
+ XGCValues values;
+ values.graphics_exposures = True;
+ values.fill_style = FillOpaqueStippled;
+ values.background = (1<<pVisual_->GetDepth())-1;
+ values.foreground = 0;
+
+ pCopyGC_ = XCreateGC( pDisp_,
+ hRefWindow_,
+ GCGraphicsExposures
+ | GCForeground
+ | GCBackground,
+ &values );
+ pAndInvertedGC_ = XCreateGC( pDisp_,
+ hRefWindow_,
+ GCGraphicsExposures
+ | GCForeground
+ | GCBackground,
+ &values );
+ pAndGC_ = XCreateGC( pDisp_,
+ hRefWindow_,
+ GCGraphicsExposures
+ | GCForeground
+ | GCBackground,
+ &values );
+ pOrGC_ = XCreateGC( pDisp_,
+ hRefWindow_,
+ GCGraphicsExposures
+ | GCForeground
+ | GCBackground,
+ &values );
+ pStippleGC_ = XCreateGC( pDisp_,
+ hRefWindow_,
+ GCGraphicsExposures
+ | GCFillStyle
+ | GCForeground
+ | GCBackground,
+ &values );
+
+ XSetFunction( pDisp_, pAndInvertedGC_, GXandInverted );
+ XSetFunction( pDisp_, pAndGC_, GXand );
+ // #44556# PowerPC Solaris 2.5 (XSun 3500) Bug: GXor = GXnop
+ //XSetFunction( pDisp_, pOrGC_, GXor );
+ XSetFunction( pDisp_, pOrGC_, GXxor );
+
+ if( 1 == pVisual_->GetDepth() ) // irgendwer dreht immer
+ {
+ XSetFunction( pDisp_, pCopyGC_, GXcopyInverted );
+ pMonoGC_ = pCopyGC_;
+ }
+ else
+ {
+ Pixmap hPixmap = XCreatePixmap( pDisp_, hRefWindow_, 1, 1, 1 );
+ pMonoGC_ = XCreateGC( pDisp_,
+ hPixmap,
+ GCGraphicsExposures,
+ &values );
+ XFreePixmap( pDisp_, hPixmap );
+ }
+
+ if( IsDisplay() )
+ {
+ hInvert50_ = XCreateBitmapFromData( pDisp_,
+ hRefWindow_,
+ invert50_bits,
+ invert50_width,
+ invert50_height );
+
+ // - - - - - - - - - - Sound - - - - - - - - - - - - - - - -
+
+ nBeepVolume_ = 0;
+
+ // - - - - - - - - - - Fonts - - - - - - - - - - - - - - - -
+
+ const char *pFontPath = getenv( "SAL_FONTPATH" );
+ if( pFontPath )
+ AddFontPath( ByteString( pFontPath ) );
+
+ // - - - - - - - - - - Keyboardmapping - - - - - - - - - - -
+
+ ModifierMapping();
+
+ // - - - - - - - - - - ShellWidget - - - - - - - - - - - - -
+
+
+ if( !XtWindow( hShell_ ) )
+ {
+ Position w, h;
+ Arg aArgs[10];
+
+ XtSetArg( aArgs[0], XtNwidth, &w );
+ XtSetArg( aArgs[1], XtNheight, &h );
+ XtGetValues( hShell_, aArgs, 2 );
+
+ if( !w || !h )
+ {
+ if( GetProperties() & PROPERTY_FEATURE_Maximize )
+ {
+ XtSetArg( aArgs[0], XtNwidth, aSize_.Width() );
+ XtSetArg( aArgs[1], XtNheight, aSize_.Height() );
+ }
+ else
+ {
+ XtSetArg( aArgs[0], XtNwidth, 500 );
+ XtSetArg( aArgs[1], XtNheight, 400 );
+ }
+ XtSetValues( hShell_, aArgs, 2 );
+ }
+
+ // X-Window erzeugen
+ XtSetMappedWhenManaged( hShell_, FALSE );
+ XtRealizeWidget( hShell_ );
+ }
+ if( !XtWindow( hComposite_ ) )
+ XtRealizeWidget( hComposite_ );
+ }
+#ifdef DBG_UTIL
+ PrintInfo();
+#endif
+
+#ifdef DEBUG
+ fprintf( stderr, "Keyboard name: %s\n", GetKeyboardName() );
+ String aConvert = GetKeyNameFromKeySym( XK_Control_L );
+ fprintf( stderr, "Control: %s\n", aConvert.Len() ? ByteString( aConvert, gsl_getSystemTextEncoding() ).GetBuffer() : "<nil>" );
+ aConvert = GetKeyNameFromKeySym( XK_Shift_L );
+ fprintf( stderr, "Shift: %s\n", aConvert.Len() ? ByteString( aConvert, gsl_getSystemTextEncoding() ).GetBuffer() : "<nil>" );
+ aConvert = GetKeyNameFromKeySym( XK_Alt_L );
+ fprintf( stderr, "Alt: %s\n", aConvert.Len() ? ByteString( aConvert, gsl_getSystemTextEncoding() ).GetBuffer() : "<nil>" );
+ aConvert = GetKeyNameFromKeySym( XK_Alt_R );
+ fprintf( stderr, "AltGr: %s\n", aConvert.Len() ? ByteString( aConvert, gsl_getSystemTextEncoding() ).GetBuffer() : "<nil>" );
+#endif
+}
+
+/*----------------------------
+ keep track of windows that are sized in ::Init but repositioned
+ by the window-mgr. If they are not resized by SalFrame::Set[Pos]Size
+ then SalFrameData::HandleReparentEvent takes a look at it, to prevent it
+ from beeing moved outside the screen
+ ------------------------------*/
+
+static unsigned int nRefWindow = 0;
+
+void
+MarkWindowAsBadPositioned( unsigned int nWindow )
+{
+ nRefWindow = nWindow;
+}
+
+void
+MarkWindowAsGoodPositioned( unsigned int nWindow )
+{
+ if ( nRefWindow == nWindow )
+ nRefWindow = 0;
+}
+
+Boolean
+WindowNeedGoodPosition( unsigned int nWindow )
+{
+ return (Boolean) nWindow == nRefWindow;
+}
+
+// Sound
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+beta void SalDisplay::Beep() const
+{
+ XBell( pDisp_, nBeepVolume_ );
+}
+
+// Keyboard
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const
+{
+ String aRet;
+ if( !nKeySym )
+ aRet = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "???" ) );
+ else
+ {
+ aRet = ::vcl_sal::getKeysymReplacementName( const_cast<SalDisplay*>(this)->GetKeyboardName(), nKeySym );
+ if( ! aRet.Len() )
+ {
+ const char *pString = XKeysymToString( nKeySym );
+ int n = strlen( pString );
+ if( n > 2 && pString[n-2] == '_' )
+ aRet = String( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 );
+ else
+ aRet = String( pString, n, RTL_TEXTENCODING_ISO_8859_1 );
+ }
+ }
+ return aRet;
+}
+
+inline KeySym sal_XModifier2Keysym( Display *pDisplay,
+ XModifierKeymap *pXModMap,
+ int n )
+{
+ return XKeycodeToKeysym( pDisplay,
+ pXModMap->modifiermap[n*pXModMap->max_keypermod],
+ 0 );
+}
+
+final void SalDisplay::ModifierMapping()
+{
+ XModifierKeymap *pXModMap = XGetModifierMapping( pDisp_ );
+
+ bNumLockFromXS_ = True;
+ nShiftKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ShiftMapIndex );
+ nCtrlKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ControlMapIndex );
+ nMod1KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex );
+
+ // Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString
+ // nicht den NumLock Modifier.
+ if( (GetServerVendor() == vendor_sun)
+ || (GetServerVendor() == vendor_sco) )
+ {
+ XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock );
+
+ if( aNumLock ) for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ )
+ {
+ if( pXModMap->modifiermap[i*pXModMap->max_keypermod] == aNumLock )
+ {
+ bNumLockFromXS_ = False;
+ nNumLockIndex_ = i;
+ nNumLockMask_ = 1<<i;
+ break;
+ }
+ }
+ }
+
+ XFreeModifiermap( pXModMap );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
+{
+ String aStrMap;
+
+ if( nKeyCode & KEY_MOD2 )
+ {
+ aStrMap += GetKeyNameFromKeySym( nMod1KeySym_ );
+ }
+ if( nKeyCode & KEY_MOD1 )
+ {
+ if( aStrMap.Len() )
+ aStrMap += '+';
+ aStrMap += GetKeyNameFromKeySym( nCtrlKeySym_ );
+ }
+ if( nKeyCode & KEY_SHIFT )
+ {
+ if( aStrMap.Len() )
+ aStrMap += '+';
+ aStrMap += GetKeyNameFromKeySym( nShiftKeySym_ );
+ }
+ nKeyCode &= 0x0FFF;
+
+ KeySym nKeySym = 0;
+
+ if( KEY_0 <= nKeyCode && nKeyCode <= KEY_9 )
+ nKeySym = XK_0 + (nKeyCode - KEY_0);
+ else if( KEY_A <= nKeyCode && nKeyCode <= KEY_Z )
+ nKeySym = XK_A + (nKeyCode - KEY_A);
+ else if( KEY_F1 <= nKeyCode && nKeyCode <= KEY_F26 ) // Existiert die Taste
+ nKeySym = XK_F1 + (nKeyCode - KEY_F1);
+ else switch( nKeyCode )
+ {
+ case KEY_DOWN:
+ nKeySym = XK_Down;
+ break;
+ case KEY_UP:
+ nKeySym = XK_Up;
+ break;
+ case KEY_LEFT:
+ nKeySym = XK_Left;
+ break;
+ case KEY_RIGHT:
+ nKeySym = XK_Right;
+ break;
+ case KEY_HOME:
+ nKeySym = XK_Home;
+ break;
+ case KEY_END:
+ nKeySym = XK_End;
+ break;
+ case KEY_PAGEUP:
+ nKeySym = XK_Prior;
+ break;
+ case KEY_PAGEDOWN:
+ nKeySym = XK_Next;
+ break;
+ case KEY_RETURN:
+ nKeySym = XK_Return;
+ break;
+ case KEY_ESCAPE:
+ nKeySym = XK_Escape;
+ break;
+ case KEY_TAB:
+ nKeySym = XK_Tab;
+ break;
+ case KEY_BACKSPACE:
+ nKeySym = XK_BackSpace;
+ break;
+ case KEY_SPACE:
+ nKeySym = XK_space;
+ break;
+ case KEY_INSERT:
+ nKeySym = XK_Insert;
+ break;
+ case KEY_DELETE:
+ nKeySym = XK_Delete;
+ break;
+ case KEY_OPEN:
+ nKeySym = XK_L7;
+ break;
+ case KEY_CUT:
+ nKeySym = XK_L10;
+ break;
+ case KEY_COPY:
+ nKeySym = XK_L6;
+ break;
+ case KEY_PASTE:
+ nKeySym = XK_L8;
+ break;
+ case KEY_UNDO:
+ nKeySym = XK_L4; // XK_Undo; ???
+ break;
+ case KEY_REPEAT:
+// nKeySym = XK_L2; // XK_Redo; ???
+ nKeySym = XK_Redo;
+ break;
+ case KEY_FIND:
+ nKeySym = XK_L9; // XK_Find; ???
+ break;
+ case KEY_PROPERTIES:
+ nKeySym = XK_L3;
+ break;
+ case KEY_FRONT:
+ nKeySym = XK_L5;
+ break;
+
+ case KEY_ADD:
+ nKeySym = XK_plus;
+ break;
+ case KEY_SUBTRACT:
+ nKeySym = XK_minus;
+ break;
+ case KEY_MULTIPLY:
+ nKeySym = XK_asterisk;
+ break;
+ case KEY_DIVIDE:
+ nKeySym = XK_slash;
+ break;
+ case KEY_POINT:
+ nKeySym = XK_period;
+ break;
+ case KEY_COMMA:
+ nKeySym = XK_comma;
+ break;
+ case KEY_LESS:
+ nKeySym = XK_less;
+ break;
+ case KEY_GREATER:
+ nKeySym = XK_greater;
+ break;
+ case KEY_EQUAL:
+ nKeySym = XK_equal;
+ break;
+ case KEY_FRONT+1: // KEY_HELP
+ nKeySym = XK_F1; // XK_Help; ???
+ break;
+
+ default:
+ nKeySym = 0;
+ break;
+ }
+
+ if( nKeySym )
+ {
+ if( aStrMap.Len() )
+ aStrMap += '+';
+ aStrMap += GetKeyNameFromKeySym( nKeySym );
+ }
+
+ return aStrMap;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#ifndef IsISOKey
+#define IsISOKey( n ) (0x0000FE00==((n)&0xFFFFFF00))
+#endif
+
+final USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
+{
+ USHORT nKey = 0;
+
+ if( XK_a <= keysym && XK_z >= keysym )
+ nKey = (USHORT)(KEY_A + (keysym - XK_a));
+ else if( XK_A <= keysym && XK_Z >= keysym )
+ nKey = (USHORT)(KEY_A + (keysym - XK_A));
+ else if( XK_0 <= keysym && XK_9 >= keysym )
+ nKey = (USHORT)(KEY_0 + (keysym - XK_0));
+ else if( IsModifierKey( keysym ) )
+ nop;
+ else if( IsKeypadKey( keysym ) )
+ {
+ if( (keysym >= XK_KP_0) && (keysym <= XK_KP_9) )
+ {
+ nKey = (USHORT)(KEY_0 + (keysym - XK_KP_0));
+ *pcPrintable = '0' + nKey - KEY_0;
+ }
+ else if( IsPFKey( keysym ) )
+ nKey = (USHORT)(KEY_F1 + (keysym - XK_KP_F1));
+ else switch( keysym )
+ {
+ case XK_KP_Space:
+ nKey = KEY_SPACE;
+ *pcPrintable = ' ';
+ break;
+ case XK_KP_Tab:
+ nKey = KEY_TAB;
+ break;
+ case XK_KP_Enter:
+ nKey = KEY_RETURN;
+ break;
+ case XK_KP_Begin:
+ case XK_KP_Home:
+ nKey = KEY_HOME;
+ break;
+ case XK_KP_Left:
+ nKey = KEY_LEFT;
+ break;
+ case XK_KP_Up:
+ nKey = KEY_UP;
+ break;
+ case XK_KP_Right:
+ nKey = KEY_RIGHT;
+ break;
+ case XK_KP_Down:
+ nKey = KEY_DOWN;
+ break;
+ case XK_KP_Prior: // XK_KP_Page_Up
+ nKey = KEY_PAGEUP;
+ break;
+ case XK_KP_Next: // XK_KP_Page_Down
+ nKey = KEY_PAGEDOWN;
+ break;
+ case XK_KP_End:
+ nKey = KEY_END;
+ break;
+ case XK_KP_Insert:
+ nKey = KEY_INSERT;
+ break;
+ case XK_KP_Delete:
+ nKey = KEY_DELETE;
+ break;
+ case XK_KP_Equal:
+ nKey = KEY_EQUAL;
+ *pcPrintable = '=';
+ break;
+ case XK_KP_Multiply:
+ nKey = KEY_MULTIPLY;
+ *pcPrintable = '*';
+ break;
+ case XK_KP_Add:
+ nKey = KEY_ADD;
+ *pcPrintable = '+';
+ break;
+ case XK_KP_Separator:
+ nKey = KEY_COMMA; // ???
+ *pcPrintable = ',';
+ break;
+ case XK_KP_Subtract:
+ nKey = KEY_SUBTRACT;
+ *pcPrintable = '-';
+ break;
+ case XK_KP_Decimal:
+ nKey = KEY_POINT;
+ *pcPrintable = '.';
+ break;
+ case XK_KP_Divide:
+ nKey = KEY_DIVIDE;
+ *pcPrintable = '/';
+ break;
+ }
+ }
+ else if( IsFunctionKey( keysym ) )
+ {
+ if( bNumLockFromXS_ )
+ {
+ if( keysym >= XK_F1 && keysym <= XK_F26 )
+ nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ }
+ else switch( keysym )
+ {
+#if 1 // Sun schaltet mit "Alt Graph"/XK_Mode_switch um
+ // - - - - - Sun X-Server Tastatur ohne Cursorblock ??? - - -
+#if 0 // Sal supports F1 - F26
+ case XK_R1: // XK_F21:
+ nKey = KEY_F21; // KEY_PRINT/KEY_SYSREQ
+ break;
+ case XK_R2: // XK_F22:
+ nKey = KEY_F22; // KEY_SCROLLLOCK
+ break;
+ case XK_R3: // XK_F23:
+ nKey = KEY_F23; // KEY_PAUSE/KEY_BREAK
+ break;
+ case XK_R4: // XK_F24:
+ nKey = KEY_F24; // KEY_EQUAL
+ break;
+ case XK_R5: // XK_F25:
+ nKey = KEY_F25; // KEY_DIVIDE
+ break;
+ case XK_R6: // XK_F26:
+ nKey = KEY_F26; // KEY_MULTIPLY
+ break;
+#endif
+ case XK_R7: // XK_F27:
+ nKey = KEY_HOME;
+ break;
+ case XK_R8: // XK_F28:
+ nKey = KEY_UP;
+ break;
+ case XK_R9: // XK_F29:
+ nKey = KEY_PAGEUP;
+ break;
+ case XK_R10: // XK_F30:
+ nKey = KEY_LEFT;
+ break;
+ case XK_R11: // XK_F31:
+ nKey = 0; // KEY_F31
+ break;
+ case XK_R12: // XK_F32:
+ nKey = KEY_RIGHT;
+ break;
+ case XK_R13: // XK_F33:
+ nKey = KEY_END;
+ break;
+ case XK_R14: // XK_F34:
+ nKey = KEY_DOWN;
+ break;
+ case XK_R15: // XK_F35:
+ nKey = KEY_PAGEDOWN;
+ break;
+ // - - - - - Sun X-Server Tastatur ??? - - - - - - - - - - - -
+ case XK_L1: // XK_F11:
+ nKey = KEY_F11; // KEY_CANCEL
+ break;
+ case XK_L2: // XK_F12:
+ if ( GetServerVendor() == vendor_sun )
+ nKey = KEY_REPEAT;
+ else
+ nKey = KEY_F12;
+ break;
+ case XK_L3: // XK_F13:
+ nKey = KEY_PROPERTIES; // KEY_F13
+ break;
+ case XK_L4: // XK_F14:
+ nKey = KEY_UNDO; // KEY_F14
+ break;
+ case XK_L5: // XK_F15:
+ nKey = KEY_F15; // KEY_FRONT
+ break;
+ case XK_L6: // XK_F16:
+ nKey = KEY_COPY; // KEY_F16
+ break;
+ case XK_L7: // XK_F17:
+ nKey = KEY_F17; // KEY_OPEN
+ break;
+ case XK_L8: // XK_F18:
+ nKey = KEY_PASTE; // KEY_F18
+ break;
+ case XK_L9: // XK_F19:
+ nKey = KEY_F19; // KEY_FIND
+ break;
+ case XK_L10: // XK_F20:
+ nKey = KEY_CUT; // KEY_F20
+ break;
+#endif
+ default:
+ if( keysym >= XK_F1 && keysym <= XK_F26 )
+ nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ break;
+ }
+ }
+ else if( IsCursorKey( keysym ) )
+ {
+ switch( keysym )
+ {
+ case XK_Begin:
+ case XK_Home:
+ nKey = KEY_HOME;
+ break;
+ case XK_Left:
+ nKey = KEY_LEFT;
+ break;
+ case XK_Up:
+ nKey = KEY_UP;
+ break;
+ case XK_Right:
+ nKey = KEY_RIGHT;
+ break;
+ case XK_Down:
+ nKey = KEY_DOWN;
+ break;
+ case XK_Prior: // XK_Page_Up
+ nKey = KEY_PAGEUP;
+ break;
+ case XK_Next: // XK_Page_Down
+ nKey = KEY_PAGEDOWN;
+ break;
+ case XK_End:
+ nKey = KEY_END;
+ break;
+ }
+ }
+ else if( IsMiscFunctionKey( keysym ) )
+ {
+ switch( keysym )
+ {
+ case XK_Insert:
+ nKey = KEY_INSERT;
+ break;
+ case XK_Redo:
+ nKey = KEY_REPEAT;
+ break;
+ case XK_Undo:
+ nKey = KEY_UNDO;
+ break;
+ case XK_Find:
+ nKey = KEY_FIND;
+ break;
+ case XK_Help:
+ nKey = KEY_FRONT+1; // KEY_HELP
+ nKey = KEY_F1;
+ break;
+ case XK_Menu:
+ nKey = KEY_F10;
+ break;
+#if 0
+ case XK_Break:
+ case XK_Select:
+ case XK_Execute:
+ case XK_Print:
+ case XK_Cancel:
+#endif
+ }
+ }
+ else if( IsISOKey( keysym ) ) // XK_ISO_
+ {
+ switch( keysym )
+ {
+ case 0xFE20: // XK_ISO_Left_Tab:
+ nKey = KEY_TAB;
+ break;
+ }
+ }
+ else switch( keysym )
+ {
+ case XK_Return:
+ nKey = KEY_RETURN;
+ break;
+ case XK_BackSpace:
+ nKey = KEY_BACKSPACE;
+ break;
+ case XK_Delete:
+ nKey = KEY_DELETE;
+ break;
+ case XK_space:
+ nKey = KEY_SPACE;
+ break;
+ case XK_Tab:
+ nKey = KEY_TAB;
+ break;
+ case XK_Escape:
+ nKey = KEY_ESCAPE;
+ break;
+ case XK_plus:
+ nKey = KEY_ADD;
+ break;
+ case XK_minus:
+ nKey = KEY_SUBTRACT;
+ break;
+ case XK_asterisk:
+ nKey = KEY_MULTIPLY;
+ break;
+ case XK_slash:
+ nKey = KEY_DIVIDE;
+ break;
+ case XK_period:
+ nKey = KEY_POINT;
+ break;
+ case XK_comma:
+ nKey = KEY_COMMA;
+ break;
+ case XK_less:
+ nKey = KEY_LESS;
+ break;
+ case XK_greater:
+ nKey = KEY_GREATER;
+ break;
+ case XK_equal:
+ nKey = KEY_EQUAL;
+ break;
+// case XK_Linefeed:
+// *pcPrintable = '\n';
+// break;
+ // - - - - - - - - - - - - - Apollo - - - - - - - - - - - - - 0x1000
+ case 0x1000FF02: // apXK_Copy
+ nKey = KEY_COPY;
+ break;
+ case 0x1000FF03: // apXK_Cut
+ nKey = KEY_CUT;
+ break;
+ case 0x1000FF04: // apXK_Paste
+ nKey = KEY_PASTE;
+ break;
+ case 0x1000FF14: // apXK_Repeat
+ nKey = KEY_REPEAT;
+ break;
+ // Exit, Save
+ // - - - - - - - - - - - - - - D E C - - - - - - - - - - - - - 0x1000
+ case 0x1000FF00:
+ nKey = KEY_DELETE;
+ break;
+ // - - - - - - - - - - - - - - H P - - - - - - - - - - - - - 0x1000
+ case 0x1000FF73: // hpXK_DeleteChar
+ nKey = KEY_DELETE;
+ break;
+ case 0x1000FF74: // hpXK_BackTab
+ case 0x1000FF75: // hpXK_KP_BackTab
+ nKey = KEY_TAB;
+ break;
+ // - - - - - - - - - - - - - - I B M - - - - - - - - - - - - -
+ // - - - - - - - - - - - - - - O S F - - - - - - - - - - - - - 0x1004
+ case 0x1004FF02: // osfXK_Copy
+ nKey = KEY_COPY;
+ break;
+ case 0x1004FF03: // osfXK_Cut
+ nKey = KEY_CUT;
+ break;
+ case 0x1004FF04: // osfXK_Paste
+ nKey = KEY_PASTE;
+ break;
+ case 0x1004FF07: // osfXK_BackTab
+ nKey = KEY_TAB;
+ break;
+ case 0x1004FF08: // osfXK_BackSpace
+ nKey = KEY_BACKSPACE;
+ break;
+ case 0x1004FF1B: // osfXK_Escape
+ nKey = KEY_ESCAPE;
+ break;
+ // Up, Down, Left, Right, PageUp, PageDown
+ // - - - - - - - - - - - - - - S C O - - - - - - - - - - - - -
+ // - - - - - - - - - - - - - - S G I - - - - - - - - - - - - - 0x1007
+ // - - - - - - - - - - - - - - S N I - - - - - - - - - - - - -
+ // - - - - - - - - - - - - - - S U N - - - - - - - - - - - - - 0x1005
+ case 0x1005FF10: // SunXK_F36
+ nKey = KEY_F11;
+ break;
+ case 0x1005FF11: // SunXK_F37
+ nKey = KEY_F12;
+ break;
+ case 0x1005FF70: // SunXK_Props
+ nKey = KEY_PROPERTIES;
+ break;
+ case 0x1005FF71: // SunXK_Front
+ nKey = KEY_FRONT;
+ break;
+ case 0x1005FF72: // SunXK_Copy
+ nKey = KEY_COPY;
+ break;
+ case 0x1005FF73: // SunXK_Open
+ nKey = KEY_OPEN;
+ break;
+ case 0x1005FF74: // SunXK_Paste
+ nKey = KEY_PASTE;
+ break;
+ case 0x1005FF75: // SunXK_Cut
+ nKey = KEY_CUT;
+ break;
+ }
+ return nKey;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent,
+ unsigned char *pPrintable,
+ int *pLen,
+ Status *pStatusReturn,
+ XIC aInputContext ) const
+{
+ KeySym nKeySym;
+ memset( pPrintable, 0, *pLen );
+
+ if ( (aInputContext == 0) || (pEvent->type == KeyRelease) )
+ {
+ XComposeStatus nStatus;
+ *pLen = XLookupString( pEvent, (char*)pPrintable, 1,
+ &nKeySym, &nStatus );
+ }
+ else
+ {
+ *pStatusReturn = 0;
+ // not really sufficient for multibyte lookup: cannot handle more
+ // than one byte in sprintable, cannot handle conversion error
+ *pLen = XmbLookupString( aInputContext,
+ pEvent, (char*)pPrintable, *pLen - 1, &nKeySym, pStatusReturn );
+
+ // Lookup the string again, now with appropriate size
+ if ( *pStatusReturn == XBufferOverflow )
+ {
+ pPrintable[ 0 ] = (char)0;
+ return 0;
+ }
+
+ switch ( *pStatusReturn )
+ {
+ case XBufferOverflow:
+ /* unhandled error */
+ break;
+ case XLookupNone:
+ /* unhandled error */
+ break;
+ case XLookupKeySym:
+ /* #72223# this is a strange one: on exceed sometimes
+ * no printable is returned for the first char entered,
+ * just to retry lookup solves the problem. The problem
+ * is not yet fully understood, so restrict 2nd lookup
+ * to 7bit ascii chars */
+ if ( (XK_space <= nKeySym) && (XK_asciitilde >= nKeySym) )
+ {
+ *pLen = 1;
+ pPrintable[ 0 ] = (char)nKeySym;
+ }
+ break;
+ case XLookupBoth:
+ case XLookupChars:
+
+ /* nothing to, char allready in pPrintable */
+ break;
+ }
+ }
+
+ if( !bNumLockFromXS_
+ && (IsCursorKey(nKeySym)
+ || IsFunctionKey(nKeySym)
+ || IsKeypadKey(nKeySym)
+ || XK_Delete == nKeySym ) )
+ {
+ // Bei einigen X-Servern muss man bei den Keypadtasten
+ // schon sehr genau hinschauen. ZB. Solaris XServer:
+ // 2, 4, 6, 8 werden als Cursorkeys klassifiziert (Up, Down, Left, Right
+ // 1, 3, 5, 9 werden als Functionkeys klassifiziert (F27,F29,F33,F35)
+ // 0 als Keypadkey und der Dezimalpunkt gar nicht (KP_Insert)
+ KeySym nNewKeySym = XLookupKeysym( pEvent, nNumLockIndex_ );
+// fprintf( stderr, "Key%s: sym=%x state=%x code=%d new=%x\n",
+// KeyRelease == pEvent->type ? "Release" : "Press",
+// nKeySym, pEvent->state, pEvent->keycode, nNewKeySym );
+ if( nNewKeySym != NoSymbol )
+ nKeySym = nNewKeySym;
+ }
+// else
+// fprintf( stderr, "Key%s: sym=%x state=%x code=%d\n",
+// KeyRelease == pEvent->type ? "Release" : "Press",
+// nKeySym, pEvent->state, pEvent->keycode );
+
+ return nKeySym;
+}
+
+// Pointer
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#define MAKE_BITMAP( name ) \
+ XCreateBitmapFromData( pDisp_, \
+ DefaultRootWindow( pDisp_ ), \
+ name##_bits, \
+ name##_width, \
+ name##_height )
+
+#define MAKE_CURSOR( name ) \
+ aCursBitmap = MAKE_BITMAP( name##curs ); \
+ aMaskBitmap = MAKE_BITMAP( name##mask ); \
+ nXHot = name##curs_x_hot; \
+ nYHot = name##curs_y_hot
+
+final XLIB_Cursor SalDisplay::GetPointer( int ePointerStyle )
+{
+ if( ePointerStyle > POINTER_COUNT )
+ return NULL;
+
+ XLIB_Cursor &aCur = aPointerCache_[ePointerStyle];
+
+ if( aCur != None )
+ return aCur;
+
+ Pixmap aCursBitmap, aMaskBitmap;
+ unsigned int nXHot, nYHot;
+
+ switch( ePointerStyle )
+ {
+ case POINTER_NULL:
+ MAKE_CURSOR( null );
+ break;
+ case POINTER_ARROW:
+ aCur = XCreateFontCursor( pDisp_, XC_top_left_arrow );
+ break;
+ case POINTER_WAIT:
+ MAKE_CURSOR( wait_ );
+ break;
+ case POINTER_TEXT: // Mouse Pointer ist ein "I" Beam
+ aCur = XCreateFontCursor( pDisp_, XC_xterm );
+ break;
+ case POINTER_HELP:
+ aCur = XCreateFontCursor( pDisp_, XC_question_arrow );
+ break;
+ case POINTER_CROSS: // Mouse Pointer ist ein Kreuz
+ aCur = XCreateFontCursor( pDisp_, XC_crosshair );
+ break;
+ case POINTER_NSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow );
+ break;
+ case POINTER_SSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow );
+ break;
+ case POINTER_WSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow );
+ break;
+ case POINTER_ESIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow );
+ break;
+ case POINTER_WINDOW_NSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_top_tee );
+ break;
+ case POINTER_WINDOW_SSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_bottom_tee );
+ break;
+ case POINTER_WINDOW_WSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_left_tee );
+ break;
+ case POINTER_WINDOW_ESIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_right_tee );
+ break;
+ case POINTER_NWSIZE:
+ MAKE_CURSOR( nwsesize_ );
+ break;
+ case POINTER_NESIZE:
+ MAKE_CURSOR( neswsize_ );
+ break;
+ case POINTER_SWSIZE:
+ MAKE_CURSOR( neswsize_ );
+ break;
+ case POINTER_SESIZE:
+ MAKE_CURSOR( nwsesize_ );
+ break;
+ case POINTER_WINDOW_NWSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_top_left_corner );
+ break;
+ case POINTER_WINDOW_NESIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_top_right_corner );
+ break;
+ case POINTER_WINDOW_SWSIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner );
+ break;
+ case POINTER_WINDOW_SESIZE:
+ aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner );
+ break;
+ case POINTER_HSPLIT:
+ MAKE_CURSOR( hsplit_ );
+ break;
+ case POINTER_VSPLIT:
+ MAKE_CURSOR( vsplit_ );
+ break;
+ case POINTER_HSIZEBAR:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); // ???
+ break;
+ case POINTER_VSIZEBAR:
+ aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); // ???
+ break;
+ case POINTER_REFHAND:
+ aCur = XCreateFontCursor( pDisp_, XC_hand1 );
+ break;
+ case POINTER_HAND:
+ aCur = XCreateFontCursor( pDisp_, XC_hand2 );
+ break;
+ case POINTER_MAGNIFY:
+ MAKE_CURSOR( magnify_ );
+ break;
+ case POINTER_FILL:
+ MAKE_CURSOR( fill_ );
+ break;
+ case POINTER_MOVE:
+ MAKE_CURSOR( move_ );
+ break;
+ case POINTER_MOVEDATA:
+ MAKE_CURSOR( movedata_ );
+ break;
+ case POINTER_COPYDATA:
+ MAKE_CURSOR( copydata_ );
+ break;
+ case POINTER_MOVEFILE:
+ MAKE_CURSOR( movefile_ );
+ break;
+ case POINTER_COPYFILE:
+ MAKE_CURSOR( copyfile_ );
+ break;
+ case POINTER_MOVEFILES:
+ MAKE_CURSOR( movefiles_ );
+ break;
+ case POINTER_COPYFILES:
+ MAKE_CURSOR( copyfiles_ );
+ break;
+ case POINTER_NOTALLOWED:
+ MAKE_CURSOR( nodrop_ );
+ break;
+ case POINTER_ROTATE:
+ MAKE_CURSOR( rotate_ );
+ break;
+ case POINTER_HSHEAR:
+ MAKE_CURSOR( hshear_ );
+ break;
+ case POINTER_VSHEAR:
+ MAKE_CURSOR( vshear_ );
+ break;
+ case POINTER_DRAW_LINE:
+ MAKE_CURSOR( drawline_ );
+ break;
+ case POINTER_DRAW_RECT:
+ MAKE_CURSOR( drawrect_ );
+ break;
+ case POINTER_DRAW_POLYGON:
+ MAKE_CURSOR( drawpolygon_ );
+ break;
+ case POINTER_DRAW_BEZIER:
+ MAKE_CURSOR( drawbezier_ );
+ break;
+ case POINTER_DRAW_ARC:
+ MAKE_CURSOR( drawarc_ );
+ break;
+ case POINTER_DRAW_PIE:
+ MAKE_CURSOR( drawpie_ );
+ break;
+ case POINTER_DRAW_CIRCLECUT:
+ MAKE_CURSOR( drawcirclecut_ );
+ break;
+ case POINTER_DRAW_ELLIPSE:
+ MAKE_CURSOR( drawellipse_ );
+ break;
+ case POINTER_DRAW_CONNECT:
+ MAKE_CURSOR( drawconnect_ );
+ break;
+ case POINTER_DRAW_TEXT:
+ MAKE_CURSOR( drawtext_ );
+ break;
+ case POINTER_MIRROR:
+ MAKE_CURSOR( mirror_ );
+ break;
+ case POINTER_CROOK:
+ MAKE_CURSOR( crook_ );
+ break;
+ case POINTER_CROP:
+ MAKE_CURSOR( crop_ );
+ break;
+ case POINTER_MOVEPOINT:
+ MAKE_CURSOR( movepoint_ );
+ break;
+ case POINTER_MOVEBEZIERWEIGHT:
+ MAKE_CURSOR( movebezierweight_ );
+ break;
+ case POINTER_DRAW_FREEHAND:
+ MAKE_CURSOR( drawfreehand_ );
+ break;
+ case POINTER_DRAW_CAPTION:
+ MAKE_CURSOR( drawcaption_ );
+ break;
+ case POINTER_PEN: // Mouse Pointer ist ein Stift
+ aCur = XCreateFontCursor( pDisp_, XC_pencil );
+ break;
+ case POINTER_LINKDATA:
+ MAKE_CURSOR( linkdata_ );
+ break;
+ case POINTER_MOVEDATALINK:
+ MAKE_CURSOR( movedlnk_ );
+ break;
+ case POINTER_COPYDATALINK:
+ MAKE_CURSOR( copydlnk_ );
+ break;
+ case POINTER_LINKFILE:
+ MAKE_CURSOR( linkfile_ );
+ break;
+ case POINTER_MOVEFILELINK:
+ MAKE_CURSOR( moveflnk_ );
+ break;
+ case POINTER_COPYFILELINK:
+ MAKE_CURSOR( copyflnk_ );
+ break;
+ case POINTER_CHART:
+ MAKE_CURSOR( chart_ );
+ break;
+ case POINTER_DETECTIVE:
+ MAKE_CURSOR( detective_ );
+ break;
+ case POINTER_PIVOT_COL:
+ MAKE_CURSOR( pivotcol_ );
+ break;
+ case POINTER_PIVOT_ROW:
+ MAKE_CURSOR( pivotrow_ );
+ break;
+ case POINTER_PIVOT_FIELD:
+ MAKE_CURSOR( pivotfld_ );
+ break;
+ case POINTER_CHAIN:
+ MAKE_CURSOR( chain_ );
+ break;
+ case POINTER_CHAIN_NOTALLOWED:
+ MAKE_CURSOR( chainnot_ );
+ break;
+ case POINTER_TIMEEVENT_MOVE:
+ MAKE_CURSOR( timemove_ );
+ break;
+ case POINTER_TIMEEVENT_SIZE:
+ MAKE_CURSOR( timesize_ );
+ break;
+ case POINTER_AUTOSCROLL_N:
+ MAKE_CURSOR(asn_ );
+ break;
+ case POINTER_AUTOSCROLL_S:
+ MAKE_CURSOR( ass_ );
+ break;
+ case POINTER_AUTOSCROLL_W:
+ MAKE_CURSOR( asw_ );
+ break;
+ case POINTER_AUTOSCROLL_E:
+ MAKE_CURSOR( ase_ );
+ break;
+ case POINTER_AUTOSCROLL_NW:
+ MAKE_CURSOR( asnw_ );
+ break;
+ case POINTER_AUTOSCROLL_NE:
+ MAKE_CURSOR( asne_ );
+ break;
+ case POINTER_AUTOSCROLL_SW:
+ MAKE_CURSOR( assw_ );
+ break;
+ case POINTER_AUTOSCROLL_SE:
+ MAKE_CURSOR( asse_ );
+ break;
+ case POINTER_AUTOSCROLL_NS:
+ MAKE_CURSOR( asns_ );
+ break;
+ case POINTER_AUTOSCROLL_WE:
+ MAKE_CURSOR( aswe_ );
+ break;
+ case POINTER_AUTOSCROLL_NSWE:
+ MAKE_CURSOR( asnswe_ );
+ break;
+ case POINTER_AIRBRUSH:
+ MAKE_CURSOR( airbrush_ );
+ break;
+ default:
+ DBG_ERROR("pointer not implemented");
+ aCur = XCreateFontCursor( pDisp_, XC_arrow );
+ break;
+ }
+
+ if( None == aCur )
+ {
+ XColor aBlack, aWhite, aDummy;
+ Colormap hColormap = xColor_->GetXColormap();
+
+ XAllocNamedColor( pDisp_, hColormap, "black", &aBlack, &aDummy );
+ XAllocNamedColor( pDisp_, hColormap, "white", &aWhite, &aDummy );
+
+ aCur = XCreatePixmapCursor( pDisp_,
+ aCursBitmap, aMaskBitmap,
+ &aBlack, &aWhite,
+ nXHot, nYHot );
+
+ XFreePixmap( pDisp_, aCursBitmap );
+ XFreePixmap( pDisp_, aMaskBitmap );
+ }
+
+ return aCur;
+}
+
+int SalDisplay::CaptureMouse( SalFrameData *pCapture )
+{
+ if( !pCapture )
+ {
+ pCapture_ = NULL;
+ XUngrabPointer( GetDisplay(), CurrentTime );
+ XFlush( GetDisplay() );
+ return 0;
+ }
+
+ if( pCapture_ )
+ //pCapture_->CaptureMouse( FALSE );
+ pCapture_ = NULL;
+
+ int ret = XGrabPointer( GetDisplay(),
+ pCapture->GetWindow(),
+ False,
+ PointerMotionMask| ButtonPressMask|ButtonReleaseMask,
+ GrabModeAsync,
+ GrabModeAsync,
+ None,
+ pCapture->GetCursor(),
+ CurrentTime );
+
+ if( ret != GrabSuccess )
+ {
+ DBG_ASSERT( 1, "SalDisplay::CaptureMouse could not grab pointer\n");
+ return -1;
+ }
+
+ pCapture_ = pCapture;
+ return 1;
+}
+
+// Fonts
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+static BOOL
+sal_IsValidFontpath( const ByteString &rFontPath,
+ const srv_vendor_t eServerVendor )
+{
+ // filter fontpath with ':unscaled' attribute for server other
+ // than xfree (e.g.: /opt/Office51/fonts/75dpi:unscaled)
+
+ const char aAttr[] = ":unscaled";
+ const USHORT nAttrLen = sizeof( aAttr ) - 1;
+ USHORT nAttrPos;
+
+ nAttrPos = rFontPath.Search( aAttr, 0 );
+ if ( nAttrPos == (rFontPath.Len() - nAttrLen) )
+ return (eServerVendor == vendor_xfree);
+
+ return TRUE;
+}
+
+final void SalDisplay::AddFontPath( const ByteString &rPath ) const
+{
+ const char cSeparator = ';' ;
+
+ if( rPath.Len()
+ && (GetServerVendor() != vendor_excursion)
+ && (GetServerVendor() != vendor_hummingbird) )
+ {
+ USHORT nCount = rPath.GetTokenCount( cSeparator );
+ int i;
+ int nPaths = 0;
+ char **pOldFontPath = XGetFontPath( pDisp_, &nPaths );
+ int nOriginalPaths = nPaths;
+ char **pNewFontPath = new char*[nPaths+nCount];
+ BOOL bOld = pXLib_->GetIgnoreXErrors();
+
+ for( i = 0; i < nPaths; i++ )
+ pNewFontPath[i] = pOldFontPath[i];
+
+ for( USHORT nNew = 0; nNew < nCount; nNew++ )
+ {
+ ByteString aPathName = rPath.GetToken( nNew, cSeparator );
+
+ if( aPathName.Len() )
+ {
+ for( i = 0; i < nPaths; i++ )
+ if( !strcmp( pNewFontPath[i], aPathName.GetBuffer() ) )
+ break;
+
+ if ( (i == nPaths)
+ && sal_IsValidFontpath(aPathName, GetServerVendor()) )
+ {
+ pNewFontPath[nPaths] = new char[aPathName.Len()+1];
+ strcpy( pNewFontPath[nPaths++], aPathName.GetBuffer() );
+ pXLib_->SetIgnoreXErrors( TRUE ); // reset WasXError
+
+ XSetFontPath( pDisp_, pNewFontPath, nPaths );
+ XSync( pDisp_, False );
+ if( pXLib_->WasXError() )
+ delete pNewFontPath[--nPaths];
+ }
+ }
+ }
+
+ while( nPaths-- > nOriginalPaths )
+ delete pNewFontPath[ nPaths ];
+
+ delete pNewFontPath;
+ XFreeFontPath( pOldFontPath );
+
+
+ pXLib_->SetIgnoreXErrors( bOld );
+ }
+}
+
+// Events
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalDisplay::Remove( XEvent *pEvent )
+{
+}
+
+final void SalDisplay::SendEvent( Atom aEvent,
+ void *pData,
+ XLIB_Window hReceiver ) const
+{
+ UINT32 aData[5];
+
+#if __SIZEOFLONG > 4
+ aData[0] = (UINT32)((long)pData & 0xffffffff);
+ aData[1] = (UINT32)((long)pData >> 32);
+#else
+ aData[0] = (UINT32)(long)pData;
+ aData[1] = NULL;
+#endif
+ aData[2] = NULL;
+#ifndef DBG_UTIL
+ aData[3] = NULL;
+ aData[4] = NULL;
+#else
+ aData[3] = ++nIn___;
+ aData[4] = nOut___;
+#endif
+ SendEvent( aEvent, aData, hReceiver );
+}
+
+final void SalDisplay::SendEvent( Atom aEvent,
+ UINT32 *Data,
+ XLIB_Window hReceiver ) const
+{
+#define pClient (&(aClient.xclient))
+ XEvent aClient;
+
+ if( !hReceiver )
+ hReceiver = GetWindow();
+
+ pClient->type = ClientMessage;
+ pClient->display = pDisp_;
+ pClient->window = hReceiver;
+ pClient->message_type = aEvent;
+ pClient->format = 32;
+
+ if( Data ) for( int i = 0; i < 5; i++ )
+ pClient->data.l[i] = Data[i];
+
+ if( osl_acquireMutex( hEventGuard_ ) )
+ {
+ pClient->send_event = 2;
+ if( pEventQueue_ )
+ {
+ SalXEvent *pEvent = pEventQueue_;
+ while( pEvent->pNext_ )
+ pEvent = pEvent->pNext_;
+
+ pEvent->pNext_ = new SalXEvent;
+ pEvent->pNext_->event_ = aClient;
+ pEvent->pNext_->pNext_ = NULL;
+ }
+ else
+ {
+ ((SalDisplay*)this)->pEventQueue_ = new SalXEvent;
+ pEventQueue_->event_ = aClient;
+ pEventQueue_->pNext_ = NULL;
+ }
+
+ osl_releaseMutex( hEventGuard_ );
+ }
+ else
+ DBG_ASSERT( 1, "SalDisplay::SendEvent !acquireMutex\n" );
+#undef pClient
+}
+
+final BOOL SalDisplay::IsEvent()
+{
+ if( pEventQueue_ )
+ return TRUE;
+
+ if( XEventsQueued( pDisp_, QueuedAlready ) )
+ return TRUE;
+
+ XFlush( pDisp_ );
+ return FALSE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+final void SalDisplay::Yield( BOOL bWait )
+{
+ SalXEvent aEvent;
+ while( !nStateOfYield_ )
+ {
+ if( pEventQueue_ )
+ {
+ nStateOfYield_ = 5;
+ if( osl_acquireMutex( hEventGuard_ ) )
+ {
+ nStateOfYield_ = 6;
+
+ SalXEvent *pEvent = pEventQueue_;
+
+ pEventQueue_ = pEventQueue_->pNext_;
+
+ osl_releaseMutex( hEventGuard_ );
+
+ aEvent.event_ = pEvent->event_;
+
+ delete pEvent;
+
+ break;
+ }
+ else
+ DBG_ASSERT( 1, "SalDisplay::Yield !acquireMutex\n" );
+ }
+
+ nStateOfYield_ = 1;
+
+ DBG_ASSERT( XtAppPending( pXLib_->GetAppContext() ), "no pending event" );
+ SalData *pSalData = GetSalData();
+ SalYieldMutex* pSalInstYieldMutex =
+ pSalData->pFirstInstance_->maInstData.mpSalYieldMutex;
+
+ DBG_ASSERT( pSalInstYieldMutex->GetThreadId() ==
+ NAMESPACE_VOS(OThread)::getCurrentIdentifier(),
+ "will crash soon since solar mutex not locked in SalDisplay::Yield" );
+
+ // note: alternate input is dispatched by XtAppNextEvent
+ XtAppNextEvent( pXLib_->GetAppContext(), &aEvent.event_ );
+ }
+
+ nStateOfYield_ = 0;
+
+ BOOL bIgnoreXErrors = pXLib_->GetIgnoreXErrors();
+
+ aEvent.pNext_ = pDispatchStack_;
+ pDispatchStack_ = &aEvent;
+
+ Dispatch( &aEvent.event_ );
+
+ pDispatchStack_ = aEvent.pNext_;
+
+#ifdef DBG_UTIL
+ if( pXLib_->WasXError() )
+ {
+ XFlush( pDisp_ );
+ PrintEvent( "SalDisplay::Yield (WasXError)", &aEvent.event_ );
+ }
+#endif
+
+ pXLib_->SetIgnoreXErrors( bIgnoreXErrors );
+}
+
+final long SalDisplay::Dispatch( XEvent *pEvent )
+{
+ if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease )
+ {
+ XLIB_Window aWindow = pEvent->xkey.window;
+ SalFrame* pFrame = NULL;
+ for( pFrame = GetSalData()->pFirstFrame_;
+ pFrame
+ && pFrame->maFrameData.GetWindow() != aWindow
+ && pFrame->maFrameData.GetShellWindow() != aWindow;
+ pFrame = pFrame->maFrameData.GetNextFrame() )
+ ;
+ if( pFrame )
+ if ( mpInputMethod->FilterEvent( pEvent ) )
+ return 0;
+ }
+ else
+ if ( mpInputMethod->FilterEvent( pEvent ) )
+ return 0;
+
+ DtIntegrator::HandleXEvent( pEvent );
+
+ switch( pEvent->type )
+ {
+ case MotionNotify:
+ while( XCheckWindowEvent( pEvent->xany.display,
+ pEvent->xany.window,
+ ButtonMotionMask,
+ pEvent ) )
+ nop;
+ break;
+
+ case MappingNotify:
+ if( MappingKeyboard == pEvent->xmapping.request )
+ XRefreshKeyboardMapping( &pEvent->xmapping );
+ else if( MappingModifier == pEvent->xmapping.request )
+ ModifierMapping();
+ break;
+
+ default:
+
+ if ( GetKbdExtension()->UseExtension()
+ && GetKbdExtension()->GetEventBase() == pEvent->type )
+ {
+ GetKbdExtension()->Dispatch( pEvent );
+ return 1;
+ }
+
+#ifdef _XSHM_H_
+ {
+ BOOL bPrevious = pXLib_->GetIgnoreXErrors();
+ pXLib_->SetIgnoreXErrors( TRUE );
+ if( pEvent->type == XShmGetEventBase( pDisp_ ) + ShmCompletion )
+ {
+ Remove( pEvent );
+ return 1;
+ }
+ pXLib_->SetIgnoreXErrors( bPrevious );
+ }
+#endif
+ break;
+ }
+
+ SalFrame *pFrame = GetSalData()->pFirstFrame_;
+
+ while( pFrame )
+ {
+ if( pFrame->maFrameData.GetWindow() == pEvent->xany.window ||
+ pFrame->maFrameData.GetShellWindow() == pEvent->xany.window )
+ {
+ return pFrame->maFrameData.Dispatch( pEvent );
+ }
+ if( pFrame->maFrameData.GetForeignParent() == pEvent->xany.window ||
+ pFrame->maFrameData.GetForeignTopLevelWindow() == pEvent->xany.window )
+ {
+ pFrame->maFrameData.Dispatch( pEvent );
+ break;
+ }
+ pFrame = pFrame->maFrameData.GetNextFrame(); // not allways NULL
+ }
+
+ // dispatch to Xt
+ XtDispatchEvent( pEvent );
+
+ // dispatch to salobjects
+ SalObjectData::Dispatch( pEvent );
+
+ return 0;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalDisplay::PrintEvent( const ByteString &rComment,
+ XEvent *pEvent ) const
+{
+ if( pEvent->type <= MappingNotify )
+ {
+ fprintf( stderr, "[%s] %s s=%d w=%ld\n",
+ rComment.GetBuffer(),
+ EventNames[pEvent->type],
+ pEvent->xany.send_event,
+ pEvent->xany.window );
+
+ switch( pEvent->type )
+ {
+ case XLIB_KeyPress:
+ case KeyRelease:
+ fprintf( stderr, "\t\ts=%d c=%d\n",
+ pEvent->xkey.state,
+ pEvent->xkey.keycode );
+ break;
+
+ case ButtonPress:
+ case ButtonRelease:
+ fprintf( stderr, "\t\ts=%d b=%d x=%d y=%d rx=%d ry=%d\n",
+ pEvent->xbutton.state,
+ pEvent->xbutton.button,
+ pEvent->xbutton.x,
+ pEvent->xbutton.y,
+ pEvent->xbutton.x_root,
+ pEvent->xbutton.y_root );
+ break;
+
+ case MotionNotify:
+ fprintf( stderr, "\t\ts=%d x=%d y=%d\n",
+ pEvent->xmotion.state,
+ pEvent->xmotion.x,
+ pEvent->xmotion.y );
+ break;
+
+ case EnterNotify:
+ case LeaveNotify:
+ fprintf( stderr, "\t\tm=%d f=%d x=%d y=%d\n",
+ pEvent->xcrossing.mode,
+ pEvent->xcrossing.focus,
+ pEvent->xcrossing.x,
+ pEvent->xcrossing.y );
+ break;
+
+ case FocusIn:
+ case FocusOut:
+ fprintf( stderr, "\t\tm=%d d=%d\n",
+ pEvent->xfocus.mode,
+ pEvent->xfocus.detail );
+ break;
+
+ case Expose:
+ case GraphicsExpose:
+ fprintf( stderr, "\t\tc=%d %d*%d %d+%d\n",
+ pEvent->xexpose.count,
+ pEvent->xexpose.width,
+ pEvent->xexpose.height,
+ pEvent->xexpose.x,
+ pEvent->xexpose.y );
+ break;
+
+ case VisibilityNotify:
+ fprintf( stderr, "\t\ts=%d\n",
+ pEvent->xvisibility.state );
+ break;
+
+ case CreateNotify:
+ case DestroyNotify:
+ break;
+
+ case MapNotify:
+ case UnmapNotify:
+ break;
+
+ case ReparentNotify:
+ fprintf( stderr, "\t\tp=%d x=%d y=%d\n",
+ pEvent->xreparent.parent,
+ pEvent->xreparent.x,
+ pEvent->xreparent.y );
+ break;
+
+ case ConfigureNotify:
+ fprintf( stderr, "\t\tb=%d %d*%d %d+%d\n",
+ pEvent->xconfigure.border_width,
+ pEvent->xconfigure.width,
+ pEvent->xconfigure.height,
+ pEvent->xconfigure.x,
+ pEvent->xconfigure.y );
+ break;
+
+ case PropertyNotify:
+ fprintf( stderr, "\t\ta=%s (0x%X)\n",
+ GetAtomName( pDisp_, pEvent->xproperty.atom ),
+ pEvent->xproperty.atom );
+ break;
+
+ case ColormapNotify:
+ fprintf( stderr, "\t\tc=%ld n=%d s=%d\n",
+ pEvent->xcolormap.colormap,
+ pEvent->xcolormap.c_new,
+ pEvent->xcolormap.state );
+ break;
+
+ case ClientMessage:
+ fprintf( stderr, "\t\ta=%s (0x%X) f=%i [0x%lX,0x%lX,0x%lX,0x%lX,0x%lX])\n",
+ GetAtomName( pDisp_, pEvent->xclient.message_type ),
+ pEvent->xclient.message_type,
+ pEvent->xclient.format,
+ pEvent->xclient.data.l[0],
+ pEvent->xclient.data.l[1],
+ pEvent->xclient.data.l[2],
+ pEvent->xclient.data.l[3],
+ pEvent->xclient.data.l[4] );
+ break;
+
+ case MappingNotify:
+ fprintf( stderr, "\t\tr=%sd\n",
+ MappingModifier == pEvent->xmapping.request
+ ? "MappingModifier"
+ : MappingKeyboard == pEvent->xmapping.request
+ ? "MappingKeyboard"
+ : "MappingPointer" );
+
+ break;
+ }
+ }
+#ifdef _XSHM_H_
+ else if( pEvent->type == XShmGetEventBase( pDisp_ ) + ShmCompletion )
+ {
+#define pCompletionEvent ((XShmCompletionEvent*)pEvent)
+ fprintf( stderr, "[%s] %s s=%d d=%ld\n",
+ rComment.GetBuffer(),
+ "ShmCompletion",
+ pCompletionEvent->send_event,
+ pCompletionEvent->drawable );
+
+ fprintf( stderr, "\t\tc=%d.%d s=%ld o=%ld\n",
+ pCompletionEvent->major_code,
+ pCompletionEvent->minor_code,
+ pCompletionEvent->shmseg,
+ pCompletionEvent->offset );
+#undef pCompletionEvent
+ }
+#endif
+ else
+ fprintf( stderr, "[%s] %d s=%d w=%ld\n",
+ rComment.GetBuffer(),
+ pEvent->type,
+ pEvent->xany.send_event,
+ pEvent->xany.window );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalDisplay::PrintInfo() const
+{
+ if( IsDisplay() )
+ {
+ fprintf( stderr, "\n" );
+ fprintf( stderr, "Environment\n" );
+ fprintf( stderr, "\t$XENVIRONMENT \t\"%s\"\n",
+ GetEnv( "XENVIRONMENT" ) );
+ fprintf( stderr, "\t$DISPLAY \t\"%s\"\n",
+ GetEnv( "DISPLAY" ) );
+ fprintf( stderr, "\t$SAL_VISUAL \t\"%s\"\n",
+ GetEnv( "SAL_VISUAL" ) );
+ fprintf( stderr, "\t$SAL_FONTPATH \t\"%s\"\n",
+ GetEnv( "SAL_FONTPATH" ) );
+ fprintf( stderr, "\t$SAL_NOSEGV \t\"%s\"\n",
+ GetEnv( "SAL_NOSEGV" ) );
+ fprintf( stderr, "\t$SAL_IGNOREXERRORS\t\"%s\"\n",
+ GetEnv( "SAL_IGNOREXERRORS" ) );
+ fprintf( stderr, "\t$SAL_PROPERTIES \t\"%s\"\n",
+ GetEnv( "SAL_PROPERTIES" ) );
+ fprintf( stderr, "\t$SAL_WM \t\"%s\"\n",
+ GetEnv( "SAL_WM" ) );
+ fprintf( stderr, "\t$SAL_SYNCHRONIZE \t\"%s\"\n",
+ GetEnv( "SAL_SYNCHRONIZE" ) );
+ fprintf( stderr, "\t$XPPATH \t\"%s\"\n",
+ GetEnv( "XPPATH" ) );
+
+ char sHostname[ 120 ];
+# ifdef USE_XMU
+ XmuGetHostname( sHostname, 120 );
+# else
+ gethostname (sHostname, 120 );
+# endif
+ fprintf( stderr, "Client\n" );
+ fprintf( stderr, "\tHost \t\"%s\"\n",
+ sHostname );
+
+ fprintf( stderr, "Display\n" );
+ fprintf( stderr, "\tHost \t\"%s\"\n",
+ DisplayString(pDisp_) );
+ fprintf( stderr, "\tVendor (Release) \t\"%s (%d)\"\n",
+ ServerVendor(pDisp_), VendorRelease(pDisp_) );
+ fprintf( stderr, "\tProtocol \t%d.%d\n",
+ ProtocolVersion(pDisp_), ProtocolRevision(pDisp_) );
+ fprintf( stderr, "\tScreen (count,def)\t%d (%d,%d)\n",
+ nScreen_, ScreenCount(pDisp_), DefaultScreen(pDisp_) );
+ fprintf( stderr, "\tshift ctrl alt \t%s (0x%X) %s (0x%X) %s (0x%X)\n",
+ KeyStr( nShiftKeySym_ ), nShiftKeySym_,
+ KeyStr( nCtrlKeySym_ ), nCtrlKeySym_,
+ KeyStr( nMod1KeySym_ ), nMod1KeySym_ );
+ if( XExtendedMaxRequestSize(pDisp_) * 4 )
+ fprintf( stderr, "\tXMaxRequestSize \t%ld %ld [bytes]\n",
+ XMaxRequestSize(pDisp_) * 4, XExtendedMaxRequestSize(pDisp_) * 4 );
+ if( GetProperties() != PROPERTY_DEFAULT )
+ fprintf( stderr, "\tProperties \t0x%lX\n", GetProperties() );
+ if( eWindowManager_ != otherwm )
+ fprintf( stderr, "\tWindowmanager \t%d\n", eWindowManager_ );
+ }
+ fprintf( stderr, "Screen\n" );
+ fprintf( stderr, "\tResolution/Size \t%d*%d %d*%d %.1lf\"\n",
+ aResolution_.A(), aResolution_.B(),
+ aSize_.Width(), aSize_.Height(),
+ Hypothenuse( DisplayWidthMM ( pDisp_, nScreen_ ),
+ DisplayHeightMM( pDisp_, nScreen_ ) ) / 25.4 );
+ fprintf( stderr, "\tBlack&White \t%lu %lu\n",
+ xColor_->GetBlackPixel(), xColor_->GetWhitePixel() );
+ fprintf( stderr, "\tRGB \t0x%lx 0x%lx 0x%lx\n",
+ pVisual_->red_mask, pVisual_->green_mask, pVisual_->blue_mask );
+ fprintf( stderr, "\tVisual \t%d-bit %s ID=0x%x\n",
+ pVisual_->GetDepth(),
+ VisualClassName[ pVisual_->GetClass() ],
+ pVisual_->GetVisualId() );
+ if( pVisual_ != pRootVisual_ )
+ fprintf( stderr, "\tRoot visual \t%d-bit %s ID=0x%x\n",
+ pRootVisual_->GetDepth(),
+ VisualClassName[ pRootVisual_->GetClass() ],
+ pRootVisual_->GetVisualId() );
+ fprintf( stderr, "\tImages (Shared) \t0x%lx (%lx)\n",
+ nImageDepths_, nSharedImages_ );
+
+ if( nStateOfYield_ || nStateOfSendEvent_ )
+ {
+ fprintf( stderr, "Thread/Signal\n" );
+ fprintf( stderr, "\tNextEvent \t%d\n", nStateOfYield_ );
+ fprintf( stderr, "\tSendEvent \t%d\n", nStateOfSendEvent_ );
+ }
+ if( pDispatchStack_ )
+ {
+ fprintf( stderr, "Event\n" );
+ SalXEvent *pEvent = pDispatchStack_;
+ while( pEvent )
+ {
+ PrintEvent( "\t\x08\x08", &pEvent->event_ );
+ pEvent = pEvent->pNext_;
+ }
+ }
+}
+
+// -=-= SalICCCM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final
+SalICCCM::SalICCCM( SalDisplay *pDisplay )
+{
+ Display *display = pDisplay->GetDisplay();
+
+ for( int i = 0; i < capacityof( AtomStrings ); i++ )
+ (&aWM_Protocols_)[i] = XInternAtom( display, AtomStrings[i], False );
+}
+
+// -=-= SalVisual -=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+SalVisual::SalVisual( const XVisualInfo* pXVI )
+{
+ *(XVisualInfo*)this = *pXVI;
+ if( GetClass() == TrueColor )
+ {
+ nRedShift_ = sal_Shift( red_mask );
+ nGreenShift_ = sal_Shift( green_mask );
+ nBlueShift_ = sal_Shift( blue_mask );
+
+ if( GetDepth() == 24 )
+ if( red_mask == 0xFF0000 )
+ if( green_mask == 0xFF00 )
+ if( blue_mask == 0xFF )
+ eRGBMode_ = RGB;
+ else
+ eRGBMode_ = other;
+ else if( blue_mask == 0xFF00 )
+ if( green_mask == 0xFF )
+ eRGBMode_ = RBG;
+ else
+ eRGBMode_ = other;
+ else
+ eRGBMode_ = other;
+ else if( green_mask == 0xFF0000 )
+ if( red_mask == 0xFF00 )
+ if( blue_mask == 0xFF )
+ eRGBMode_ = GRB;
+ else
+ eRGBMode_ = other;
+ else if( blue_mask == 0xFF00 )
+ if( red_mask == 0xFF )
+ eRGBMode_ = GBR;
+ else
+ eRGBMode_ = other;
+ else
+ eRGBMode_ = other;
+ else if( blue_mask == 0xFF0000 )
+ if( red_mask == 0xFF00 )
+ if( green_mask == 0xFF )
+ eRGBMode_ = BRG;
+ else
+ eRGBMode_ = other;
+ else if( green_mask == 0xFF00 )
+ if( red_mask == 0xFF )
+ eRGBMode_ = BGR;
+ else
+ eRGBMode_ = other;
+ else
+ eRGBMode_ = other;
+ else
+ eRGBMode_ = other;
+ else
+ eRGBMode_ = other;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+SalVisual::~SalVisual()
+{
+ if( -1 == screen && -1 == visualid ) delete visual;
+}
+
+// Konvertiert die Reihenfolge der Bytes eines Pixel in Bytes eines SalColors
+// fuer die 6 XXXA ist das nicht reversibel
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// SalColor is RGB (ABGR) a=0xFF000000, r=0xFF0000, g=0xFF00, b=0xFF
+
+#define SALCOLOR RGB
+#define SALCOLORREVERSE BGR
+
+BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
+{
+ int n;
+
+ switch( GetMode() )
+ {
+ case other:
+ return FALSE;
+ break;
+ case SALCOLOR:
+ break;
+ case SALCOLORREVERSE:
+ case RBG:
+ case BRG:
+ case GBR:
+ case GRB:
+ return Convert( n0, n1, n2 );
+ break;
+ case RGBA:
+ n = n0;
+ n0 = n1;
+ n1 = n2;
+ n2 = n3;
+ n3 = n;
+ break;
+ case BGRA:
+ case RBGA:
+ case BRGA:
+ case GBRA:
+ case GRBA:
+ default:
+ fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
+ abort();
+ break;
+ }
+ return TRUE;
+}
+
+BOOL SalVisual::Convert( int &n0, int &n1, int &n2 )
+{
+ int n;
+
+ switch( GetMode() )
+ {
+ case other:
+ return FALSE;
+ break;
+ case SALCOLOR:
+ break;
+ case RBG:
+ n = n0;
+ n0 = n1;
+ n1 = n;
+ break;
+ case GRB:
+ n = n1;
+ n1 = n2;
+ n2 = n;
+ break;
+ case SALCOLORREVERSE:
+ n = n0;
+ n0 = n2;
+ n2 = n;
+ break;
+ case BRG:
+ n = n0;
+ n0 = n1;
+ n1 = n2;
+ n2 = n;
+ break;
+ case GBR:
+ n = n2;
+ n2 = n1;
+ n1 = n0;
+ n0 = n;
+ break;
+ default:
+ fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
+ abort();
+ break;
+ }
+ return TRUE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalColor SalVisual::GetTCColor( Pixel nPixel ) const
+{
+ if( SALCOLOR == eRGBMode_ )
+ return (SalColor)nPixel;
+
+ if( SALCOLORREVERSE == eRGBMode_ )
+ return MAKE_SALCOLOR( (nPixel & 0x0000FF),
+ (nPixel & 0x00FF00) >> 8,
+ (nPixel & 0xFF0000) >> 16);
+
+ Pixel r = nPixel & red_mask;
+ Pixel g = nPixel & green_mask;
+ Pixel b = nPixel & blue_mask;
+
+ if( other != eRGBMode_ ) // 8+8+8=24
+ return MAKE_SALCOLOR( r >> nRedShift_,
+ g >> nGreenShift_,
+ b >> nBlueShift_ );
+
+ if( nRedShift_ > 0 ) r >>= nRedShift_; else r <<= -nRedShift_;
+ if( nGreenShift_ > 0 ) g >>= nGreenShift_; else g <<= -nGreenShift_;
+ if( nBlueShift_ > 0 ) b >>= nBlueShift_; else b <<= -nBlueShift_;
+
+ return MAKE_SALCOLOR( r, g, b );
+}
+
+final Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const
+{
+ if( SALCOLOR == eRGBMode_ )
+ return (Pixel)nSalColor;
+
+ Pixel r = (Pixel)SALCOLOR_RED( nSalColor );
+ Pixel g = (Pixel)SALCOLOR_GREEN( nSalColor );
+ Pixel b = (Pixel)SALCOLOR_BLUE( nSalColor );
+
+ if( SALCOLORREVERSE == eRGBMode_ )
+ return (b << 16) | (g << 8) | (r);
+
+ if( other != eRGBMode_ ) // 8+8+8=24
+ return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_);
+
+ if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_;
+ if( nGreenShift_ > 0 ) g <<= nGreenShift_; else g >>= -nGreenShift_;
+ if( nBlueShift_ > 0 ) b <<= nBlueShift_; else b >>= -nBlueShift_;
+
+ return (r&red_mask) | (g&green_mask) | (b&blue_mask);
+}
+
+// -=-= SalColormap -=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalColormap::SalColormap( SalDisplay *pDisplay, Colormap hColormap )
+ : pDisplay_( pDisplay ),
+ hColormap_( hColormap ),
+ pPalette_( NULL ),
+ pLookupTable_( NULL )
+{
+ pVisual_ = pDisplay_->GetVisual();
+
+ if( pVisual_ == pDisplay_->GetRootVisual() )
+ {
+ nBlackPixel_ = BlackPixel( pDisplay_->GetDisplay(),
+ pDisplay_->GetScreenNumber() );
+ nWhitePixel_ = WhitePixel( pDisplay_->GetDisplay(),
+ pDisplay_->GetScreenNumber() );
+ }
+ else
+ {
+ XColor aColor;
+
+ GetXPixel( aColor, 0x00, 0x00, 0x00 );
+ nBlackPixel_ = aColor.pixel;
+
+ GetXPixel( aColor, 0xFF, 0xFF, 0xFF );
+ nWhitePixel_ = aColor.pixel;
+ }
+
+ nUsed_ = 1 << pVisual_->GetDepth();
+
+ if( pVisual_->GetClass() == PseudoColor )
+ {
+ XColor aColor;
+ int r, g, b;
+
+ // black, white, gray, ~gray = 4
+ GetXPixels( aColor, 0xC0, 0xC0, 0xC0 );
+
+ // light colors: 3 * 2 = 6
+// GetXPixels( aColor, 0x00, 0x00, 0x00 );
+ GetXPixels( aColor, 0x00, 0x00, 0xFF );
+ GetXPixels( aColor, 0x00, 0xFF, 0x00 );
+ GetXPixels( aColor, 0x00, 0xFF, 0xFF );
+// GetXPixels( aColor, 0xFF, 0x00, 0x00 );
+// GetXPixels( aColor, 0xFF, 0x00, 0xFF );
+// GetXPixels( aColor, 0xFF, 0xFF, 0x00 );
+// GetXPixels( aColor, 0xFF, 0xFF, 0xFF );
+
+ // standard colors: 7 * 2 = 14
+// GetXPixels( aColor, 0x00, 0x00, 0x00 );
+ GetXPixels( aColor, 0x00, 0x00, 0x80 );
+ GetXPixels( aColor, 0x00, 0x80, 0x00 );
+ GetXPixels( aColor, 0x00, 0x80, 0x80 );
+ GetXPixels( aColor, 0x80, 0x00, 0x00 );
+ GetXPixels( aColor, 0x80, 0x00, 0x80 );
+ GetXPixels( aColor, 0x80, 0x80, 0x00 );
+ GetXPixels( aColor, 0x80, 0x80, 0x80 );
+ GetXPixels( aColor, 0x00, 0xB8, 0xFF ); // Blau 7
+
+ // cube: 6*6*6 - 8 = 208
+ for( r = 0; r < 0x100; r += 0x33 ) // 0x33, 0x66, 0x99, 0xCC, 0xFF
+ for( g = 0; g < 0x100; g += 0x33 )
+ for( b = 0; b < 0x100; b += 0x33 )
+ GetXPixels( aColor, r, g, b );
+
+ // gray: 16 - 6 = 10
+ for( g = 0x11; g < 0xFF; g += 0x11 )
+ GetXPixels( aColor, g, g, g );
+
+ // green: 16 - 6 = 10
+ for( g = 0x11; g < 0xFF; g += 0x11 )
+ GetXPixels( aColor, 0, g, 0 );
+
+ // red: 16 - 6 = 10
+ for( r = 0x11; r < 0xFF; r += 0x11 )
+ GetXPixels( aColor, r, 0, 0 );
+
+ // blue: 16 - 6 = 10
+ for( b = 0x11; b < 0xFF; b += 0x11 )
+ GetXPixels( aColor, 0, 0, b );
+ }
+}
+
+// PseudoColor
+final SalColormap::SalColormap( const BitmapPalette &rPalette )
+ : pDisplay_( GetSalData()->GetCurDisp() ),
+ hColormap_( None ),
+ pVisual_( NULL ),
+ nUsed_( rPalette.GetEntryCount() ),
+ nBlackPixel_( 0xFFFFFFFF ),
+ nWhitePixel_( 0xFFFFFFFF ),
+ pLookupTable_( NULL )
+{
+ pPalette_ = new SalColor[nUsed_];
+
+ for( int i = 0; i < nUsed_; i++ )
+ {
+ const BitmapColor &rColor = rPalette[i];
+ pPalette_[i] = MAKE_SALCOLOR( rColor.GetRed(),
+ rColor.GetGreen(),
+ rColor.GetBlue() );
+ if( nBlackPixel_ == 0xFFFFFFFF && SALCOLOR_BLACK == pPalette_[i] )
+ nBlackPixel_ = i;
+ else if( nWhitePixel_ == 0xFFFFFFFF && SALCOLOR_WHITE == pPalette_[i] )
+ nWhitePixel_ = i;
+ }
+}
+
+// MonoChrome
+final SalColormap::SalColormap()
+ : pDisplay_( GetSalData()->GetCurDisp() ),
+ hColormap_( None ),
+ pVisual_( NULL ),
+ nUsed_( 2 ),
+ nBlackPixel_( 0 ),
+ nWhitePixel_( 1 ),
+ pLookupTable_( NULL )
+{
+ pPalette_ = new SalColor[nUsed_];
+
+ pPalette_[nBlackPixel_] = SALCOLOR_BLACK;
+ pPalette_[nWhitePixel_] = SALCOLOR_WHITE;
+}
+
+// TrueColor
+final SalColormap::SalColormap( USHORT nDepth )
+ : pDisplay_( GetSalData()->GetCurDisp() ),
+ hColormap_( None ),
+ pPalette_( NULL ),
+ nUsed_( 1 << nDepth ),
+ nWhitePixel_( (1 << nDepth) - 1 ),
+ nBlackPixel_( 0x00000000 ),
+ pLookupTable_( NULL )
+
+{
+ SalVisual *pVisual = pDisplay_->GetVisual();
+
+ if( pVisual->GetClass() == TrueColor && pVisual->GetDepth() == nDepth )
+ pVisual_ = pVisual;
+ else
+ {
+ XVisualInfo aVI;
+
+ if( !XMatchVisualInfo( pDisplay_->GetDisplay(),
+ pDisplay_->GetScreenNumber(),
+ nDepth,
+ TrueColor,
+ &aVI ) )
+ {
+ aVI.visual = new Visual();
+ aVI.visualid = (VisualID)-1;
+ aVI.screen = -1;
+ aVI.depth = nDepth;
+ aVI.c_class = TrueColor;
+ if( 24 == nDepth ) // 888
+ {
+ aVI.red_mask = 0xFF0000;
+ aVI.green_mask = 0x00FF00;
+ aVI.blue_mask = 0x0000FF;
+ }
+ else if( 16 == nDepth ) // 565
+ {
+ aVI.red_mask = 0x00F800;
+ aVI.green_mask = 0x0007E0;
+ aVI.blue_mask = 0x00001F;
+ }
+ else if( 15 == nDepth ) // 555
+ {
+ aVI.red_mask = 0x007C00;
+ aVI.green_mask = 0x0003E0;
+ aVI.blue_mask = 0x00001F;
+ }
+ else if( 12 == nDepth ) // 444
+ {
+ aVI.red_mask = 0x000F00;
+ aVI.green_mask = 0x0000F0;
+ aVI.blue_mask = 0x00000F;
+ }
+ else if( 8 == nDepth ) // 332
+ {
+ aVI.red_mask = 0x0000E0;
+ aVI.green_mask = 0x00001C;
+ aVI.blue_mask = 0x000003;
+ }
+ else
+ {
+ aVI.red_mask = 0x000000;
+ aVI.green_mask = 0x000000;
+ aVI.blue_mask = 0x000000;
+ }
+ aVI.colormap_size = 0;
+ aVI.bits_per_rgb = 8;
+
+ aVI.visual->ext_data = NULL;
+ aVI.visual->visualid = aVI.visualid;
+ aVI.visual->c_class = aVI.c_class;
+ aVI.visual->red_mask = aVI.red_mask;
+ aVI.visual->green_mask = aVI.green_mask;
+ aVI.visual->blue_mask = aVI.blue_mask;
+ aVI.visual->bits_per_rgb = aVI.bits_per_rgb;
+ aVI.visual->map_entries = aVI.colormap_size;
+ }
+
+ pVisual_ = new SalVisual( &aVI );
+ }
+}
+
+final SalColormap::~SalColormap()
+{
+ if( hColormap_
+ && pDisplay_->IsDisplay()
+ && hColormap_ != DefaultColormap( GetXDisplay(), pDisplay_->GetScreenNumber() ) )
+ XFreeColormap( GetXDisplay(), hColormap_ );
+ delete pPalette_;
+ delete pLookupTable_;
+ if( pVisual_ != pDisplay_->GetVisual() )
+ delete pVisual_;
+
+#ifdef DBG_UTIL
+ hColormap_ = (Colormap)ILLEGAL_POINTER;
+ pDisplay_ = (SalDisplay*)ILLEGAL_POINTER;
+ pPalette_ = (SalColor*)ILLEGAL_POINTER;
+ pLookupTable_ = (USHORT*)ILLEGAL_POINTER;
+ pVisual_ = (SalVisual*)ILLEGAL_POINTER;
+#endif
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalColormap::SetPalette( const BitmapPalette &rPalette )
+{
+ if( this != &GetSalData()->GetCurDisp()->GetColormap() )
+ {
+ nBlackPixel_ = 0xFFFFFFFF;
+ nWhitePixel_ = 0xFFFFFFFF;
+ }
+
+ if( rPalette.GetEntryCount() > nUsed_ )
+ {
+ nBlackPixel_ = 0xFFFFFFFF;
+ nWhitePixel_ = 0xFFFFFFFF;
+ delete pPalette_;
+ pPalette_ = new SalColor[rPalette.GetEntryCount()];
+ nUsed_ = rPalette.GetEntryCount();
+ }
+
+ for( int i = 0; i < rPalette.GetEntryCount(); i++ )
+ {
+ const BitmapColor &rColor = rPalette[i];
+ pPalette_[i] = MAKE_SALCOLOR( rColor.GetRed(),
+ rColor.GetGreen(),
+ rColor.GetBlue() );
+ if( nBlackPixel_ == 0xFFFFFFFF && SALCOLOR_BLACK == pPalette_[i] )
+ nBlackPixel_ = i;
+ else if( nWhitePixel_ == 0xFFFFFFFF && SALCOLOR_WHITE == pPalette_[i] )
+ nWhitePixel_ = i;
+ }
+}
+
+final void SalColormap::GetPalette()
+{
+ Pixel i;
+
+ pPalette_ = new SalColor[nUsed_];
+
+ XColor *aColor = new XColor[nUsed_];
+
+ for( i = 0; i < nUsed_; i++ )
+ {
+ aColor[i].red = aColor[i].green = aColor[i].blue = 0;
+ aColor[i].pixel = i;
+ }
+
+ XQueryColors( pDisplay_->GetDisplay(), hColormap_, aColor, nUsed_ );
+
+ for( i = 0; i < nUsed_; i++ )
+ {
+ pPalette_[i] = MAKE_SALCOLOR( aColor[i].red >> 8,
+ aColor[i].green >> 8,
+ aColor[i].blue >> 8 );
+ }
+
+ delete aColor;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final static USHORT sal_Lookup( SalColor *pPalette,
+ int r, int g, int b,
+ Pixel nUsed )
+{
+ USHORT nPixel = 0;
+ int nBest = ColorDiff( pPalette[0], r, g, b );
+
+ for( USHORT i = 1; i < nUsed; i++ )
+ {
+ int n = ColorDiff( pPalette[i], r, g, b );
+
+ if( n < nBest )
+ {
+ if( !n )
+ return i;
+
+ nPixel = i;
+ nBest = n;
+ }
+ }
+ return nPixel;
+}
+
+final void SalColormap::GetLookupTable()
+{
+ USHORT *p = pLookupTable_ = new USHORT[16*16*16];
+
+ for( int r = 0; r < 256; r += 17 )
+ for( int g = 0; g < 256; g += 17 )
+ for( int b = 0; b < 256; b += 17 )
+ *p++ = sal_Lookup( pPalette_, r, g, b, nUsed_ );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalColor SalColormap::GetColor( Pixel nPixel ) const
+{
+ if( nBlackPixel_ == nPixel ) return SALCOLOR_BLACK;
+ if( nWhitePixel_ == nPixel ) return SALCOLOR_WHITE;
+
+ if( pVisual_ )
+ {
+ if( pVisual_->GetClass() == TrueColor )
+ return pVisual_->GetTCColor( nPixel );
+
+ if( !pPalette_
+ && ( hColormap_ || XSalIsPrinter( GetXDisplay() ) )
+#ifdef PSEUDOCOLOR12
+ && pVisual_->GetDepth() <= 12
+#else
+ && pVisual_->GetDepth() <= 8
+#endif
+ && pVisual_->GetClass() == PseudoColor )
+ ((SalColormap*)this)->GetPalette();
+ }
+
+ if( pPalette_ && nPixel < nUsed_ )
+ return pPalette_[nPixel];
+
+ if( !hColormap_ && !XSalIsPrinter( GetXDisplay() ) )
+ {
+ DBG_ASSERT( 1, "SalColormap::GetColor() !hColormap_\n" );
+ return nPixel;
+ }
+
+ // DirectColor, StaticColor, StaticGray, GrayScale
+ XColor aColor;
+
+ aColor.pixel = nPixel;
+
+ XQueryColor( pDisplay_->GetDisplay(), hColormap_, &aColor );
+
+ return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 );
+}
+
+final inline BOOL SalColormap::GetXPixel( XColor &rColor,
+ int r,
+ int g,
+ int b ) const
+{
+ rColor.red = r * 257;
+ rColor.green = g * 257;
+ rColor.blue = b * 257;
+ return XAllocColor( GetXDisplay(), hColormap_, &rColor );
+}
+
+final BOOL SalColormap::GetXPixels( XColor &rColor,
+ int r,
+ int g,
+ int b ) const
+{
+ if( !GetXPixel( rColor, r, g, b ) )
+ return FALSE;
+ if( rColor.pixel & 1 )
+ return TRUE;
+ return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF );
+}
+
+final Pixel SalColormap::GetPixel( SalColor nSalColor ) const
+{
+ if( 0xFFFFFFFF == nSalColor ) return 0;
+ if( SALCOLOR_BLACK == nSalColor ) return nBlackPixel_;
+ if( SALCOLOR_WHITE == nSalColor ) return nWhitePixel_;
+
+ if( pVisual_ && pVisual_->GetClass() == TrueColor )
+ return pVisual_->GetTCPixel( nSalColor );
+
+ if( !pLookupTable_ )
+ {
+ if( !pPalette_
+ && ( hColormap_ || XSalIsPrinter( GetXDisplay() ) )
+ && pVisual_
+#ifdef PSEUDOCOLOR12
+ && pVisual_->GetDepth() <= 12
+#else
+ && pVisual_->GetDepth() <= 8
+#endif
+ && pVisual_->GetClass() == PseudoColor ) // what else ???
+ ((SalColormap*)this)->GetPalette();
+
+ if( pPalette_ )
+ for( Pixel i = 0; i < nUsed_; i++ )
+ if( pPalette_[i] == nSalColor )
+ return i;
+
+ if( hColormap_ || XSalIsPrinter( GetXDisplay() ) )
+ {
+ // DirectColor, StaticColor, StaticGray, GrayScale (PseudoColor)
+ XColor aColor;
+
+ if( GetXPixel( aColor,
+ SALCOLOR_RED ( nSalColor ),
+ SALCOLOR_GREEN( nSalColor ),
+ SALCOLOR_BLUE ( nSalColor ) ) )
+ {
+ if( pPalette_ && !pPalette_[aColor.pixel] )
+ {
+ pPalette_[aColor.pixel] = nSalColor;
+
+ if( !(aColor.pixel & 1) && !pPalette_[aColor.pixel+1] )
+ {
+ XColor aInversColor;
+
+ SalColor nInversColor = nSalColor ^ 0xFFFFFF;
+
+ GetXPixel( aInversColor,
+ SALCOLOR_RED ( nInversColor ),
+ SALCOLOR_GREEN( nInversColor ),
+ SALCOLOR_BLUE ( nInversColor ) );
+
+ if( !pPalette_[aInversColor.pixel] )
+ pPalette_[aInversColor.pixel] = nInversColor;
+#ifdef DBG_UTIL
+ else
+ fprintf( stderr, "SalColormap::GetPixel() 0x06lx=%d 0x06lx=%d\n",
+ nSalColor, aColor.pixel,
+ nInversColor, aInversColor.pixel);
+#endif
+ }
+ }
+
+ return aColor.pixel;
+ }
+
+#ifdef DBG_UTIL
+ fprintf( stderr, "SalColormap::GetPixel() !XAllocColor %lx\n",
+ nSalColor );
+#endif
+ }
+
+ if( !pPalette_ )
+ {
+ fprintf( stderr, "SalColormap::GetPixel() !pPalette_ %lx\n",
+ nSalColor);
+ return nSalColor;
+ }
+
+ ((SalColormap*)this)->GetLookupTable();
+ }
+
+ // Colormatching ueber Palette
+ USHORT r = SALCOLOR_RED ( nSalColor );
+ USHORT g = SALCOLOR_GREEN( nSalColor );
+ USHORT b = SALCOLOR_BLUE ( nSalColor );
+ return pLookupTable_[ (((r+8)/17) << 8)
+ + (((g+8)/17) << 4)
+ + ((b+8)/17) ];
+}
+
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
new file mode 100644
index 000000000000..374ab09a94df
--- /dev/null
+++ b/vcl/unx/source/app/salinst.cxx
@@ -0,0 +1,346 @@
+/*************************************************************************
+ *
+ * $RCSfile: salinst.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALINST_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <salunx.h>
+
+#ifndef _VOS_MUTEX_HXX
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _SV_SALWTYPE_HXX
+#include <salwtype.hxx>
+#endif
+#ifndef _SV_SALATYPE_HXX
+#include <salatype.hxx>
+#endif
+#ifndef _SV_DTINT_HXX
+#include <dtint.hxx>
+#endif
+#ifndef _SV_SALPRN_H
+#include <salprn.h>
+#endif
+#ifndef _VCL_SALCONFIG_HXX
+#include <salconfig.hxx>
+#endif
+
+// -=-= C++ globals =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+void SalAbort( const XubString& rErrorText )
+{
+ if( !rErrorText.Len() )
+ fprintf( stderr, "Application Error" );
+ else
+ fprintf( stderr, ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() );
+ abort();
+}
+
+
+// -------------------------------------------------------------------------
+//
+// SalYieldMutex
+//
+// -------------------------------------------------------------------------
+
+SalYieldMutex::SalYieldMutex()
+{
+ mnCount = 0;
+ mnThreadId = 0;
+}
+
+void SalYieldMutex::acquire()
+{
+ OMutex::acquire();
+ mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnCount++;
+}
+
+void SalYieldMutex::release()
+{
+ if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ {
+ if ( mnCount == 1 )
+ mnThreadId = 0;
+ mnCount--;
+ }
+ OMutex::release();
+}
+
+sal_Bool SalYieldMutex::tryToAcquire()
+{
+ if ( OMutex::tryToAcquire() )
+ {
+ mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnCount++;
+ return True;
+ }
+ else
+ return False;
+}
+
+//----------------------------------------------------------------------------
+
+final void InitSalData()
+{
+ SalData *pSalData = new SalData;
+ SetSalData( pSalData );
+}
+
+final void DeInitSalData()
+{
+ SalData *pSalData = GetSalData();
+ delete pSalData;
+ SetSalData( NULL );
+}
+
+final void SetFilterCallback( void* pCallback, void* pInst )
+{
+ SalData* pSalData = GetSalData();
+
+ pSalData->pFirstInstance_->maInstData.mpFilterCallback = pCallback;
+ pSalData->pFirstInstance_->maInstData.mpFilterInst = pInst;
+}
+
+final SalInstance *CreateSalInstance()
+{
+ SalData *pSalData = GetSalData();
+ SalInstance *pInst = new SalInstance;
+
+ // init instance (only one instance in this version !!!)
+ pSalData->pFirstInstance_ = pInst;
+
+ StartPrinterListening();
+
+ return pInst;
+}
+
+final void DestroySalInstance( SalInstance *pInst )
+{
+ SalData *pSalData = GetSalData();
+
+ // reset instance (only one instance in this version !!!)
+ if( pSalData->pFirstInstance_ == pInst )
+ {
+ StopPrinterListening();
+ pSalData->pFirstInstance_ = NULL;
+ ::vcl_sal::XpDefaults::release();
+ }
+
+ delete pInst;
+}
+
+// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalInstance::SalInstance()
+{
+ maInstData.mpFilterCallback = NULL;
+ maInstData.mpFilterInst = NULL;
+ maInstData.mpSalYieldMutex = new SalYieldMutex;
+ maInstData.mpSalYieldMutex->acquire();
+}
+
+final SalInstance::~SalInstance()
+{
+// #75711# - java is running
+ maInstData.mpSalYieldMutex->release();
+ delete maInstData.mpSalYieldMutex;
+}
+
+
+// --------------------------------------------------------
+// AnyInput from sv/mow/source/app/svapp.cxx
+
+struct PredicateReturn
+{
+ USHORT nType;
+ BOOL bRet;
+};
+
+Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
+{
+ PredicateReturn *pPre = (PredicateReturn *)pData;
+
+ if ( pPre->bRet )
+ return False;
+
+ USHORT nType;
+
+ switch( pEvent->type )
+ {
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ nType = INPUT_MOUSE;
+ break;
+
+ case XLIB_KeyPress:
+ //case KeyRelease:
+ nType = INPUT_KEYBOARD;
+ break;
+ case Expose:
+ case GraphicsExpose:
+ case NoExpose:
+ nType = INPUT_PAINT;
+ break;
+ default:
+ nType = 0;
+ }
+
+ if ( nType & pPre->nType || ( ! nType && pPre->nType & INPUT_OTHER ) )
+ pPre->bRet = TRUE;
+
+ return False;
+}
+
+
+alpha BOOL SalInstance::AnyInput(USHORT nType)
+{
+ SalData *pSalData = GetSalData();
+ Display *pDisplay = pSalData->GetDefDisp()->GetDisplay();
+
+ // XtInputMask nMask = XtAppPending( SVData().GetAppContext() );
+ // if( nMask )
+ if (XPending(pDisplay) )
+ {
+ // if ( INPUT_TIMER & nType && XtIMTimer & nMask )
+ // return TRUE;
+ // else
+ {
+ PredicateReturn aInput;
+ XEvent aEvent;
+
+ aInput.bRet = FALSE;
+ aInput.nType = nType;
+
+ XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent,
+ (char *)&aInput );
+
+ return aInput.bRet;
+ }
+ }
+ return FALSE ;
+}
+
+#ifdef _VOS_NO_NAMESPACE
+IMutex* SalInstance::GetYieldMutex()
+#else
+vos::IMutex* SalInstance::GetYieldMutex()
+#endif
+{
+ return maInstData.mpSalYieldMutex;
+}
+
+// -----------------------------------------------------------------------
+
+ULONG SalInstance::ReleaseYieldMutex()
+{
+ SalYieldMutex* pYieldMutex = maInstData.mpSalYieldMutex;
+ if ( pYieldMutex->GetThreadId() ==
+ NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ {
+ ULONG nCount = pYieldMutex->GetAcquireCount();
+ ULONG n = nCount;
+ while ( n )
+ {
+ pYieldMutex->release();
+ n--;
+ }
+
+ return nCount;
+ }
+ else
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SalInstance::AcquireYieldMutex( ULONG nCount )
+{
+ SalYieldMutex* pYieldMutex = maInstData.mpSalYieldMutex;
+ while ( nCount )
+ {
+ pYieldMutex->acquire();
+ nCount--;
+ }
+}
+
+final void SalInstance::Yield( BOOL bWait )
+{ GetSalData()->GetLib()->Yield( bWait ); }
+
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
new file mode 100644
index 000000000000..47f855ce365a
--- /dev/null
+++ b/vcl/unx/source/app/salsys.cxx
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * $RCSfile: salsys.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALSYS_CXX
+
+#include <cstdio>
+#include <string>
+
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALSYS_HXX
+#include <salsys.hxx>
+#endif
+#ifndef _SV_DTINT_HXX
+#include <dtint.hxx>
+#endif
+#include <salframe.hxx>
+
+#include <strhelper.hxx>
+#include <stacktrace.hxx>
+
+
+void SalSystemData::CreateDtIntegrator( SalFrame* pNewFrame )
+{
+ if( pNewFrame )
+ {
+ if( m_pDtIntegrator && m_pDtIntegrator->GetDisplay() !=
+ pNewFrame->maFrameData.GetDisplay()->GetDisplay() )
+ {
+ m_pDtIntegrator->Release();
+ m_pDtIntegrator = 0;
+ }
+ if( ! m_pDtIntegrator )
+ {
+ m_pDtIntegrator = DtIntegrator::CreateDtIntegrator( pNewFrame );
+ m_pDtIntegrator->Acquire();
+ }
+ }
+}
+
+void SalSystemData::SetSalDisplay( SalDisplay *pSalDisplay )
+{
+ m_pSalDisplay = pSalDisplay;
+}
+
+SalSystemData::~SalSystemData()
+{
+ if( m_pDtIntegrator )
+ m_pDtIntegrator->Release();
+}
+
+
+// -----------------------------------------------------------------------
+
+SalSystem* SalInstance::CreateSystem()
+{
+ return new SalSystem();
+}
+
+// -----------------------------------------------------------------------
+
+void SalInstance::DestroySystem( SalSystem* pSystem )
+{
+ delete pSystem;
+}
+
+// =======================================================================
+
+SalSystem::SalSystem()
+{
+ maSystemData.m_pSalDisplay = 0;
+ maSystemData.m_pDtIntegrator = 0;
+}
+
+// -----------------------------------------------------------------------
+
+SalSystem::~SalSystem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SalSystem::StartProcess( SalFrame* pFrame, const String& rFileName,
+ const String& rParam,
+ const String& rWorkingDirectory )
+{
+ maSystemData.CreateDtIntegrator( pFrame );
+
+ XubString aFileName( '\"' );
+ aFileName += rFileName;
+ aFileName += '\"';
+
+ // StartProcess is desktop specific
+ return maSystemData.m_pDtIntegrator->
+ StartProcess( aFileName,
+ const_cast<XubString&>(rParam),
+ const_cast<XubString&>(rWorkingDirectory) );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SalSystem::AddRecentDoc( SalFrame* pFrame, const XubString& rFileName )
+{
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+String SalSystem::GetSummarySystemInfos( ULONG nFlags )
+{
+ sal_PostMortem aPostMortem;
+
+ /*
+ * unimplemented flags:
+ * SALSYSTEM_GETSYSTEMINFO_MODULES
+ * SALSYSTEM_GETSYSTEMINFO_MOUSEINFO
+ * SALSYSTEM_GETSYSTEMINFO_SYSTEMDIRS
+ * SALSYSTEM_GETSYSTEMINFO_LOCALVOLUMES
+ */
+
+ ByteString aRet;
+ if( nFlags & SALSYSTEM_GETSYSTEMINFO_SYSTEMVERSION )
+ aRet += aPostMortem.getSystemInfo();
+ if( nFlags & SALSYSTEM_GETSYSTEMINFO_CPUTYPE )
+ aRet += aPostMortem.getProcessorInfo();
+ if( nFlags & SALSYSTEM_GETSYSTEMINFO_MEMORYINFO )
+ aRet += aPostMortem.getMemoryInfo();
+ if( nFlags & SALSYSTEM_GETSYSTEMINFO_STACK )
+ aRet += aPostMortem.getStackTrace();
+ if( nFlags & SALSYSTEM_GETSYSTEMINFO_GRAPHICSSYSTEM )
+ aRet += aPostMortem.getGraphicsSystem();
+
+#ifdef DEBUG
+ fprintf( stderr, "SalSystem::GetSummarySystemInfos() =\n%s", aRet.GetBuffer() );
+#endif
+ return String( aRet, RTL_TEXTENCODING_ISO_8859_1 );
+}
+
diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx
new file mode 100644
index 000000000000..754d0509de66
--- /dev/null
+++ b/vcl/unx/source/app/saltimer.cxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: saltimer.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALTIMER_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/times.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALTIMER_HXX
+#include <saltimer.hxx>
+#endif
+
+// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalData::Timeout() const
+{
+ if( pTimerProc_ )
+ pTimerProc_();
+}
+
+// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final inline void SalXLib::StopTimer()
+{
+ Timeout_.tv_sec = 0;
+ Timeout_.tv_usec = 0;
+ nTimeoutMS_ = 0;
+}
+
+final inline void SalXLib::StartTimer( ULONG nMS )
+{
+ gettimeofday( &Timeout_, NULL );
+
+ nTimeoutMS_ = nMS;
+ Timeout_.tv_sec += nTimeoutMS_ / 1000;
+ Timeout_.tv_usec += nTimeoutMS_ ? (nTimeoutMS_ % 1000) * 1000 : 500;
+ if( Timeout_.tv_usec > 1000000 )
+ {
+ Timeout_.tv_sec++;
+ Timeout_.tv_usec -= 1000000;
+ }
+}
+
+// -=-= SalTimer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+/* static */ final void SalTimer::SetCallback( SALTIMERPROC pProc )
+{ GetSalData()->SetCallback( pProc ); }
+
+
+/* static */ final void SalTimer::Stop()
+{
+ GetSalData()->GetLib()->StopTimer();
+}
+
+/* static */ final void SalTimer::Start( ULONG nMS )
+{
+ GetSalData()->GetLib()->StartTimer( nMS );
+}
+
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
new file mode 100644
index 000000000000..b6552ac490bc
--- /dev/null
+++ b/vcl/unx/source/app/sm.cxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * $RCSfile: sm.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <unistd.h>
+#include <stdio.h>
+
+#include <vos/process.hxx>
+#include <vos/security.hxx>
+
+#ifndef _VCL_SM_HXX
+#include <sm.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_CONFIG_HXX
+#include <config.hxx>
+#endif
+
+//#define USE_SM_EXTENSION
+
+BOOL ICEConnectionObserver::bIsWatching = FALSE;
+SmcConn SessionManagerClient::aSmcConnection = NULL;
+char* SessionManagerClient::pClientID = NULL;
+
+static SmProp* pSmProps = NULL;
+static SmProp** ppSmProps = NULL;
+static int nSmProps = 0;
+
+static void BuildSmPropertyList()
+{
+ if( ! pSmProps )
+ {
+ ByteString aExec( SessionManagerClient::getExecName(), gsl_getSystemTextEncoding() );
+
+ nSmProps = 4;
+ pSmProps = new SmProp[ nSmProps ];
+
+ pSmProps[ 0 ].name = "SmCloneCommand";
+ pSmProps[ 0 ].type = "SmLISTofARRAY8";
+ pSmProps[ 0 ].num_vals = 1;
+ pSmProps[ 0 ].vals = new SmPropValue;
+ pSmProps[ 0 ].vals->length = aExec.Len();
+ pSmProps[ 0 ].vals->value = strdup( aExec.GetBuffer() );
+
+ pSmProps[ 1 ].name = "SmProgram";
+ pSmProps[ 1 ].type = "SmARRAY8";
+ pSmProps[ 1 ].num_vals = 1;
+ pSmProps[ 1 ].vals = new SmPropValue;
+ pSmProps[ 1 ].vals->length = aExec.Len();
+ pSmProps[ 1 ].vals->value = strdup( aExec.GetBuffer() );
+
+ pSmProps[ 2 ].name = "SmRestartCommand";
+ pSmProps[ 2 ].type = "SmLISTofARRAY8";
+ pSmProps[ 2 ].num_vals = 1;
+ pSmProps[ 2 ].vals = new SmPropValue;
+ pSmProps[ 2 ].vals->length = aExec.Len();
+ pSmProps[ 2 ].vals->value = strdup( aExec.GetBuffer() );
+
+ NAMESPACE_VOS(OSecurity) aSecurity;
+ ::rtl::OUString aUserName;
+ aSecurity.getUserName( aUserName );
+ ::rtl::OString aUser( ::rtl::OUStringToOString( aUserName, gsl_getSystemTextEncoding() ) );
+
+ pSmProps[ 3 ].name = "SmUserID";
+ pSmProps[ 3 ].type = "SmARRAY8";
+ pSmProps[ 3 ].num_vals = 1;
+ pSmProps[ 3 ].vals = new SmPropValue;
+ pSmProps[ 3 ].vals->value = strdup( aUser.getStr() );
+ pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value );
+
+ ppSmProps = new SmProp*[ nSmProps ];
+ for( int i = 0; i < nSmProps; i++ )
+ ppSmProps[ i ] = &pSmProps[i];
+ }
+}
+
+
+void SessionManagerClient::SaveYourselfProc(
+ SmcConn connection,
+ SmPointer client_data,
+ int save_type,
+ Bool shutdown,
+ int interact_style,
+ Bool fast
+ )
+{
+ BuildSmPropertyList();
+#ifdef USE_SM_EXTENSION
+ SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
+ SmcSaveYourselfDone( aSmcConnection, True );
+#endif
+}
+
+void SessionManagerClient::DieProc(
+ SmcConn connection,
+ SmPointer client_data
+ )
+{
+#ifdef USE_SM_EXTENSION
+ SmcCloseConnection( connection, 0, NULL );
+#endif
+ if( connection == aSmcConnection )
+ aSmcConnection = NULL;
+}
+
+void SessionManagerClient::SaveCompleteProc(
+ SmcConn connection,
+ SmPointer client_data
+ )
+{
+}
+
+void SessionManagerClient::ShutdownCanceledProc(
+ SmcConn connection,
+ SmPointer client_data )
+{
+}
+
+void SessionManagerClient::open()
+{
+ static SmcCallbacks aCallbacks;
+
+#ifdef USE_SM_EXTENSION
+ // erst scharf schalten wenn getestet
+
+ // this is the way Xt does it, so we can too
+ if( ! aSmcConnection && getenv( "SESSION_MANAGER" ) )
+ {
+ char aErrBuf[1024];
+ String aFilename( getenv( "HOME" ) );
+ aFilename += "/.so_lastSessionID";
+
+ ICEConnectionObserver::activate();
+
+ aCallbacks.save_yourself.callback = SaveYourselfProc;
+ aCallbacks.save_yourself.client_data = NULL;
+ aCallbacks.die.callback = DieProc;
+ aCallbacks.die.client_data = NULL;
+ aCallbacks.save_complete.callback = SaveCompleteProc;
+ aCallbacks.save_complete.client_data = NULL;
+ aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc;
+ aCallbacks.shutdown_cancelled.client_data = NULL;
+ aSmcConnection = SmcOpenConnection( NULL,
+ NULL,
+ SmProtoMajor,
+ SmProtoMinor,
+ SmcSaveYourselfProcMask |
+ SmcDieProcMask |
+ SmcSaveCompleteProcMask |
+ SmcShutdownCancelledProcMask ,
+ &aCallbacks,
+ getPreviousSessionID(),
+ &pClientID,
+ sizeof( aErrBuf ),
+ aErrBuf );
+#if defined DEBUG || defined DBG_UTIL
+ if( ! aSmcConnection )
+ fprintf( stderr, "SmcOpenConnection failed: %s\n", aErrBuf );
+#endif
+ setPreviousSessionID( pClientID );
+ }
+#endif
+}
+
+void SessionManagerClient::close()
+{
+ if( aSmcConnection )
+ {
+#ifdef USE_SM_EXTENSION
+ SmcCloseConnection( aSmcConnection, 0, NULL );
+#endif
+ aSmcConnection = NULL;
+ ICEConnectionObserver::deactivate();
+ }
+}
+
+
+String SessionManagerClient::getExecName()
+{
+ static NAMESPACE_VOS( OStartupInfo ) aStartupInfo;
+
+ ::rtl::OUString aExec;
+ aStartupInfo.getExecutableFile( aExec );
+
+ int nPos = aExec.search( ::rtl::OUString::createFromAscii( ".bin" ) );
+ if( nPos != -1 )
+ aExec = aExec.copy( 0, nPos );
+ return aExec;
+}
+
+
+char* SessionManagerClient::getPreviousSessionID()
+{
+ static char aID[1024];
+
+ String aFilename( getenv( "HOME" ), gsl_getSystemTextEncoding() );
+ aFilename.AppendAscii( "/.sosessions" );
+
+ ByteString aExec( getExecName(), gsl_getSystemTextEncoding() );
+ aExec = aExec.GetToken( aExec.GetTokenCount( '/' )-1, '/' );
+
+ Config aConfig( aFilename );
+ aConfig.SetGroup( "Sessions" );
+ ByteString aSessionID = aConfig.ReadKey( aExec );
+ if( aSessionID.Len() )
+ {
+ strncpy( aID, aSessionID.GetBuffer(), sizeof( aID ) );
+ return aID;
+ }
+ return NULL;
+}
+
+void SessionManagerClient::setPreviousSessionID( const ByteString& rID )
+{
+ static char aID[1024];
+
+ String aFilename( getenv( "HOME" ), gsl_getSystemTextEncoding() );
+ aFilename.AppendAscii( "/.sosessions" );
+
+ ByteString aExec( getExecName(), gsl_getSystemTextEncoding() );
+ aExec = aExec.GetToken( aExec.GetTokenCount( '/' )-1, '/' );
+
+ Config aConfig( aFilename );
+ aConfig.SetGroup( "Sessions" );
+ aConfig.WriteKey( aExec, rID );
+}
+
+void ICEConnectionObserver::activate()
+{
+ if( ! bIsWatching )
+ {
+ bIsWatching = TRUE;
+#ifdef USE_SM_EXTENSION
+ IceAddConnectionWatch( ICEWatchProc, NULL );
+#endif
+ }
+}
+
+void ICEConnectionObserver::deactivate()
+{
+ if( bIsWatching )
+ {
+ bIsWatching = FALSE;
+#ifdef USE_SM_EXTENSION
+ IceRemoveConnectionWatch( ICEWatchProc, NULL );
+#endif
+ }
+}
+
+void ICEConnectionObserver::ICEWatchProc(
+ IceConn connection,
+ IcePointer client_data,
+ Bool opening,
+ IcePointer* watch_data
+ )
+{
+#ifdef USE_SM_EXTENSION
+ if( opening )
+ GetSalData()->GetLib()->Insert( IceConnectionNumber( connection ),
+ connection,
+ (YieldFunc)Pending,
+ (YieldFunc)Queued,
+ (YieldFunc)HandleEvents );
+ else
+ GetSalData()->GetLib()->Remove( IceConnectionNumber( connection ) );
+#endif
+}
+
+int ICEConnectionObserver::Pending( int fd, void* data )
+{
+ return 1;
+}
+
+int ICEConnectionObserver::Queued( int fd, void* data )
+{
+ return 1;
+}
+
+int ICEConnectionObserver::HandleEvents( int fd, void* data )
+{
+#ifdef USE_SM_EXTENSION
+ IceProcessMessages( (IceConn)data, NULL, NULL );
+#endif
+ return 0;
+}
+
diff --git a/vcl/unx/source/app/soicon.cxx b/vcl/unx/source/app/soicon.cxx
new file mode 100644
index 000000000000..caf8c6797156
--- /dev/null
+++ b/vcl/unx/source/app/soicon.cxx
@@ -0,0 +1,502 @@
+/*************************************************************************
+ *
+ * $RCSfile: soicon.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:42 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SOICON_CXX
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <salunx.h>
+
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALBMP_HXX
+#include <salbmp.hxx>
+#endif
+#ifndef _SV_SALBTYPE_HXX
+#include <salbtype.hxx>
+#endif
+#ifndef _SV_IMPBMP_HXX
+#include <impbmp.hxx>
+#endif
+#ifndef _SV_BITMAP_HXX
+#include <bitmap.hxx>
+#endif
+#ifndef _SV_BITMAP_HXX
+#include <bitmapex.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX
+#include <graph.hxx>
+#endif
+#ifndef _SV_CVTGRF_HXX
+#include <cvtgrf.hxx>
+#endif
+#ifndef _SV_STRHELPER_HXX
+#include <strhelper.hxx>
+#endif
+
+#include <tools/stream.hxx>
+#include <tools/string.hxx>
+
+
+#include "so.xpm"
+
+static Pixmap aAppPixmap = 0, aAppMask = 0;
+
+static void ConvertXpm( SalDisplay* pDisplay )
+{
+ int nWidth, nHeight, nColors, nCharsPerPixel;
+ XColor *pColors;
+ char *pColorAlias;
+ int nElement = 0,nColor = 0,i,nX,nY;
+ char pColorName[16], pComName[16],pColorString[256];
+ BOOL bTransparent = FALSE;
+
+ sscanf( xpmdata[ nElement++ ], "%d%d%d%d", &nWidth, &nHeight,
+ &nColors, &nCharsPerPixel );
+#if defined DBG_UTIL || defined DEBUG
+ fprintf( stderr, "ConvertXpm: converting width = %d height = %d ncolors = %d chars_per_pixel = %d\n", nWidth, nHeight, nColors, nCharsPerPixel );
+#endif
+ nColor = 0;
+ pColors = new XColor[ nColors ];
+ pColorAlias = new char[ nColors * nCharsPerPixel ];
+ while( nElement <= nColors )
+ {
+ sscanf( xpmdata[ nElement++ ],"%s %s %s",
+ pColorName, pComName, pColorString);
+ if( strncmp( pColorString, "None", 4 ) )
+ {
+ XAllocNamedColor( pDisplay->GetDisplay(),
+ DefaultColormap( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ),
+ pColorString, &pColors[nColor], &pColors[nColor] );
+ strncpy( &pColorAlias[nColor*nCharsPerPixel],
+ pColorName, nCharsPerPixel );
+ nColor++;
+ }
+ }
+ nColors = nColor+1;
+
+ aAppPixmap = XCreatePixmap( pDisplay->GetDisplay(),
+ pDisplay->GetRootWindow(),
+ nWidth, nHeight,
+ pDisplay->GetRootVisual()->GetDepth() );
+ XSetForeground( pDisplay->GetDisplay(),
+ DefaultGC( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ),
+ BlackPixel( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ) );
+ XFillRectangle( pDisplay->GetDisplay(), aAppPixmap,
+ DefaultGC( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ),
+ 0,0,nWidth,nHeight );
+
+ aAppMask = XCreatePixmap( pDisplay->GetDisplay(),
+ pDisplay->GetRootWindow(),
+ nWidth, nHeight, 1 );
+
+ XGCValues aValues;
+ aValues.function = GXset;
+ aValues.foreground = 0xffffffff;
+ GC aMonoGC = XCreateGC( pDisplay->GetDisplay(), aAppMask,
+ GCFunction|GCForeground, &aValues );
+
+ XFillRectangle( pDisplay->GetDisplay(), aAppMask, aMonoGC,
+ 0,0, nWidth, nHeight );
+ aValues.function = GXclear;
+ XChangeGC( pDisplay->GetDisplay(), aMonoGC, GCFunction, &aValues );
+
+ for( nY=0; nY < nHeight; nY++ )
+ {
+ char *pRun = xpmdata[ nElement+nY ];
+ for( nX=0; nX < nWidth; nX++ )
+ {
+ // get color number
+ nColor = 0;
+ while( nColor < nColors &&
+ strncmp( pRun, &pColorAlias[nColor*nCharsPerPixel],
+ nCharsPerPixel ) )
+ nColor++;
+ if( nColor < nColors )
+ {
+ XSetForeground( pDisplay->GetDisplay(),
+ DefaultGC( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ),
+ pColors[ nColor ].pixel );
+ XDrawPoint( pDisplay->GetDisplay(),
+ aAppPixmap,
+ DefaultGC( pDisplay->GetDisplay(),
+ pDisplay->GetScreenNumber() ),
+ nX, nY );
+
+ }
+ else
+ {
+ bTransparent = TRUE;
+ XDrawPoint( pDisplay->GetDisplay(),
+ aAppMask, aMonoGC, nX, nY );
+ }
+ pRun += nCharsPerPixel;
+ }
+ }
+ delete pColors;
+ delete pColorAlias;
+ XFreeGC( pDisplay->GetDisplay(), aMonoGC );
+
+ if( ! bTransparent )
+ {
+#if defined DBG_UTIL || defined DEBUG
+ fprintf( stderr, "ConvertXpm: keine Transparenz -> keine Maske\n" );
+#endif
+ XFreePixmap( pDisplay->GetDisplay(), aAppMask );
+ aAppMask = 0;
+ }
+}
+
+Pixmap GetAppIconPixmap( SalDisplay *pDisplay )
+{
+ if( ! aAppPixmap )
+ ConvertXpm( pDisplay );
+ return aAppPixmap;
+}
+
+Pixmap GetAppIconMask( SalDisplay *pDisplay )
+{
+ if( ! aAppPixmap )
+ ConvertXpm( pDisplay );
+ return aAppMask;
+}
+
+static void NextLine( SvStream& rFile, ByteString& rLine, BOOL bXpm2Mode )
+{
+ if( bXpm2Mode )
+ {
+ rFile.ReadLine( rLine );
+ }
+ else
+ {
+ do
+ {
+ rFile.ReadLine( rLine );
+ rLine = rLine.GetToken( 1, '"' );
+ if( rLine.Len() )
+ rLine = rLine.GetToken( 0, '"' );
+ } while( ! ( rLine.Len() || rFile.IsEof() ) );
+ }
+}
+
+BOOL ReadXBMFile( Display* pDisplay, const String& rFile, SalBitmap*& rpBmp )
+{
+ SvFileStream aFile( rFile, STREAM_READ );
+ int nBytes = 0;
+ int nWidth= -1, nHeight=-1;
+ BOOL bSuccess = FALSE;
+
+ rpBmp = NULL;
+
+ // read in bitmap file ( cause XReadBitmapFileData not present
+ // in Solaris 2.5.1)
+ if( ! aFile.IsOpen() )
+ return FALSE;
+
+ ByteString aLine;
+
+ while( ( nWidth < 0 || nHeight < 0 ) && ! aFile.IsEof() )
+ {
+ aFile.ReadLine( aLine );
+ aLine = WhitespaceToSpace( aLine );
+
+ if( aLine.GetChar(0) == '#' )
+ {
+ if( aLine.Search( "_width" ) != STRING_NOTFOUND )
+ nWidth = aLine.GetToken( ' ', 2 ).ToInt32();
+ else if( aLine.Search( "_height" ) != STRING_NOTFOUND )
+ nHeight = aLine.GetToken( ' ', 2 ).ToInt32();
+ }
+ }
+
+ if( nWidth <= 0 || nHeight <= 0 )
+ return FALSE;
+
+ BitmapPalette aPal( 2 );
+ const Size aSize( nWidth, nHeight );
+
+ aPal[ 0 ] = BitmapColor( 0, 0, 0 );
+ aPal[ 1 ] = BitmapColor( 0xff, 0xff, 0xff );
+
+ rpBmp = new SalBitmap;
+ rpBmp->Create( aSize, 1, aPal );
+
+ BitmapBuffer* pBmpBuf = rpBmp->AcquireBuffer( FALSE );
+ BYTE* pBmpScan = pBmpBuf->mpBits + ( nHeight - 1 ) * pBmpBuf->mnScanlineSize;
+ long nX = 0, nY = 0;
+
+ aFile.Seek( 0L );
+
+ do
+ {
+ int nPos;
+
+ aFile.ReadLine( aLine );
+ aLine.ToUpperAscii();
+
+ while( ( ( nPos = aLine.Search( "0X" ) ) != STRING_NOTFOUND ) && ( nY < nHeight ) )
+ {
+ BYTE cData = 0;
+
+ for( int i = 0; i < 2; i++ )
+ {
+ cData *= 16;
+ char c = aLine.GetChar( nPos + 2 + i);
+
+ if( c >= '0' && c <= '9' )
+ cData += (unsigned char)( c - '0' );
+ else if( c >= 'A' && c <= 'F' )
+ cData += (unsigned char)( c - 'A' + 10 );
+ }
+
+ *pBmpScan++ += ( ( cData & 1 ) << 7 ) | ( ( cData & 2 ) << 5 ) |
+ ( ( cData & 4 ) << 3 ) | ( ( cData & 8 ) << 1 ) |
+ ( ( cData & 16 ) >> 1 ) | ( ( cData & 32 ) >> 3 ) |
+ ( ( cData & 64 ) >> 5 ) | ( ( cData& 128 ) >> 7 );
+
+ if( ( nX += 8 ) >= nWidth )
+ nX = 0, pBmpScan = pBmpBuf->mpBits + ( nHeight - ++nY - 1 ) * pBmpBuf->mnScanlineSize;
+
+ aLine.Erase( 0, nPos + 5 );
+ }
+ }
+ while( !aFile.IsEof() && ( nY < nHeight ) );
+
+ rpBmp->ReleaseBuffer( pBmpBuf, FALSE );
+
+ return TRUE;
+}
+
+//------------------------------------------------------------------------------
+
+BOOL ReadXPMFile( Display* pDisplay, const String& rFile,
+ SalBitmap*& rpBmp, SalBitmap*& rpMsk )
+{
+ SvFileStream aFile( rFile, STREAM_READ );
+ ByteString aColorName, aColorString, aLine;
+ int nWidth, nHeight, nColors, nCharsPerPixel;
+ int nElement = 0,nColor = 0, i, nX, nY;
+ UINT8* pColorTable;
+ char* pColorAlias;
+ BOOL bTransparent = FALSE;
+ BOOL bXpm2Mode = FALSE;
+
+ rpBmp = rpMsk = NULL;
+
+ if( ! aFile.IsOpen() )
+ return FALSE;
+
+ aFile.ReadLine( aLine );
+ aLine = WhitespaceToSpace( aLine );
+
+ if( aLine.CompareTo( "! XPM", 5 ) == COMPARE_EQUAL )
+ bXpm2Mode = TRUE;
+ else
+ {
+ bXpm2Mode = FALSE;
+ aFile.Seek( 0L );
+ }
+
+ NextLine( aFile, aLine, bXpm2Mode );
+
+ nWidth = GetCommandLineToken( 0, aLine ).ToInt32();
+ nHeight = GetCommandLineToken( 1, aLine ).ToInt32();
+ nColors = GetCommandLineToken( 2, aLine ).ToInt32();
+ nCharsPerPixel = GetCommandLineToken( 3, aLine ).ToInt32();
+
+ if( nWidth == 0 || nHeight == 0 || nColors == 0 || nCharsPerPixel == 0 )
+ {
+ // not really an xpm despite the name => try to load it via GraphicConverter
+ aFile.Seek( 0L );
+ Graphic aGraphic;
+ GraphicConverter::Import( aFile, aGraphic );
+
+ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() );
+
+ if( aBitmapEx.GetSizePixel().Width() == 0 || aBitmapEx.GetSizePixel().Height() == 0 )
+ return FALSE;
+
+ const Bitmap aBmp( aBitmapEx.GetBitmap() );
+ const Bitmap aMsk( aBitmapEx.GetMask() );
+
+ if( !!aBmp )
+ {
+ rpBmp = new SalBitmap;
+ rpBmp->Create( *aBmp.ImplGetImpBitmap()->ImplGetSalBitmap() );
+ }
+
+ if( !!aMsk )
+ {
+ rpMsk = new SalBitmap;
+ rpMsk->Create( *aMsk.ImplGetImpBitmap()->ImplGetSalBitmap() );
+ }
+
+ return TRUE;
+ }
+
+ nColor = 0;
+ pColorTable = new UINT8[ (nColors+1) * 3 ];
+ pColorAlias = new char[ nColors * nCharsPerPixel ];
+ XColor aExactColor;
+ aExactColor.flags = DoRed | DoGreen | DoBlue;
+ while( nColors )
+ {
+ NextLine( aFile, aLine, bXpm2Mode );
+ // might be a space as color variable
+ aColorName = aLine.Copy( 0, nCharsPerPixel );
+ aLine.Erase( 0, nCharsPerPixel );
+ aLine = WhitespaceToSpace( aLine );
+
+ int nPos = aLine.Search( " c " );
+ if( nPos == STRING_NOTFOUND && aLine.CompareIgnoreCaseToAscii( "c ", 2 ) == COMPARE_EQUAL )
+ nPos = 2;
+ else
+ nPos += 3;
+ aColorString = aLine.Copy( nPos );
+
+ if( aColorString.CompareIgnoreCaseToAscii( "none", 4 ) != COMPARE_EQUAL )
+ {
+ XParseColor( pDisplay,
+ DefaultColormap( pDisplay,
+ DefaultScreen( pDisplay ) ),
+ aColorString.GetBuffer(),
+ &aExactColor );
+ pColorTable[ nColor * 3 +2 ] = (UINT8)(aExactColor.red / 256 );
+ pColorTable[ nColor * 3 +1 ] = (UINT8)(aExactColor.green / 256 );
+ pColorTable[ nColor * 3 ] = (UINT8)(aExactColor.blue / 256 );
+ strncpy( pColorAlias + nColor*nCharsPerPixel,
+ aColorName.GetBuffer(), nCharsPerPixel );
+ nColor++;
+ }
+ nColors--;
+ }
+ pColorTable[ 3*nColor ] = pColorTable[ 3*nColor+1 ] =
+ pColorTable[ 3*nColor+2 ] = 0;
+ nColors = nColor;
+
+ // read SalBitmap's
+ BitmapPalette aPal( 2 );
+ const Size aSize( nWidth, nHeight );
+
+ aPal[ 0 ] = BitmapColor( 0, 0, 0 );
+ aPal[ 1 ] = BitmapColor( 0xff, 0xff, 0xff );
+
+ rpBmp = new SalBitmap;
+ rpBmp->Create( aSize, 24, aPal );
+ BitmapBuffer* pBmpBuf = rpBmp->AcquireBuffer( FALSE );
+
+ rpMsk = new SalBitmap;
+ rpMsk->Create( aSize, 1, aPal );
+ BitmapBuffer* pMskBuf = rpMsk->AcquireBuffer( FALSE );
+
+ for( nY=0; nY < nHeight; nY++ )
+ {
+ NextLine( aFile, aLine, bXpm2Mode );
+
+ const char* pRun = aLine.GetBuffer();
+ BYTE* pBmpScan = pBmpBuf->mpBits + pBmpBuf->mnScanlineSize * ( nHeight - nY - 1 );
+ BYTE* pMskScan = pMskBuf->mpBits + pMskBuf->mnScanlineSize * ( nHeight - nY - 1 );
+ UINT8 nMaskByte = 0;
+
+ for( nX = 0; nX < nWidth; nX++ )
+ {
+ // get color number
+ for( nColor=0; nColor < nColors; nColor++ )
+ {
+ if( ! strncmp( pRun, pColorAlias + nColor*nCharsPerPixel,
+ nCharsPerPixel ) )
+ break;
+ }
+
+ long nIndex = nColor * 3;
+
+ *pBmpScan++ = pColorTable[ nIndex++ ];
+ *pBmpScan++ = pColorTable[ nIndex++ ];
+ *pBmpScan++ = pColorTable[ nIndex ];
+
+ if( nColor == nColors )
+ nMaskByte |= ( 1 << ( 7 - ( nX & 7 ) ) );
+
+ pRun += nCharsPerPixel;
+
+ if( ( ( nX & 7 ) == 7 ) || ( nX == nWidth - 1 ) )
+ {
+ *pMskScan++ = nMaskByte;
+ nMaskByte = 0;
+ }
+ }
+ }
+
+ rpBmp->ReleaseBuffer( pBmpBuf, FALSE );
+ rpMsk->ReleaseBuffer( pMskBuf, FALSE );
+ delete[] pColorTable;
+ delete[] pColorAlias;
+
+ return TRUE;
+}
diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx
new file mode 100644
index 000000000000..8783958b79f4
--- /dev/null
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -0,0 +1,572 @@
+/*************************************************************************
+ *
+ * $RCSfile: cdeint.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <stdlib.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <salunx.h>
+#include <saldisp.hxx>
+#include <salbmp.hxx>
+#include <salframe.hxx>
+#include <cdeint.hxx>
+#include <soicon.hxx>
+#include <strhelper.hxx>
+#include <tools/debug.hxx>
+
+void* CDEIntegrator::pDtSvcLib = 0;
+void* CDEIntegrator::pXtLib = 0;
+void* CDEIntegrator::pXmLib = 0;
+void* CDEIntegrator::pMrmLib = 0;
+void* CDEIntegrator::pttLib = 0;
+int CDEIntegrator::nRefCount = 0;
+char* CDEIntegrator::pFallbackRes[] = {
+ "title: OfficeCDEIntegrationShell",
+ NULL
+};
+static char *ppDummyArgv[] = { "soffice.bin", NULL };
+static int nDummyArgc = 1;
+
+// function pointers
+// from DtSvc
+XLIB_Boolean (*CDEIntegrator::pDtAppInitialize)
+ ( XtAppContext, Display*, Widget, char*, char* ) = 0;
+void (*CDEIntegrator::pDtDtsLoadDataTypes)() = 0;
+void (*CDEIntegrator::pDtDtsRelease)() = 0;
+char* (*CDEIntegrator::pDtDtsFileToAttributeValue)
+ (const char*,const char*) = 0;
+void (*CDEIntegrator::pDtDtsFreeAttributeValue)( char* ) = 0;
+Status (*CDEIntegrator::pDtWsmGetWorkspaceInfo)( Display*, XLIB_Window, Atom,
+ DtWsmWorkspaceInfo** ) = 0;
+void (*CDEIntegrator::pDtWsmFreeWorkspaceInfo)( DtWsmWorkspaceInfo* ) = 0;
+Status (*CDEIntegrator::pDtWsmGetWorkspaceList)( Display*, XLIB_Window, Atom**,
+ int* ) = 0;
+Status (*CDEIntegrator::pDtWsmGetCurrentWorkspace)( Display*, XLIB_Window root, Atom* ) = 0;
+Status (*CDEIntegrator::pDtWsmGetWorkspacesOccupied)( Display*, XLIB_Window, Atom**, unsigned long* ) = 0;
+
+// from Mrm
+void (*CDEIntegrator::pMrmInitialize)() = 0;
+
+// from Xm
+WidgetClass* CDEIntegrator::pxmDrawingAreaWidgetClass = 0;
+WidgetClass* CDEIntegrator::pxmRowColumnWidgetClass = 0;
+WidgetClass* CDEIntegrator::pxmPushButtonWidgetClass = 0;
+
+// from Xt
+void (*CDEIntegrator::pXtToolkitInitialize)() = 0;
+XtAppContext (*CDEIntegrator::pXtCreateApplicationContext)() = 0;
+Widget (*CDEIntegrator::pXtAppCreateShell)
+ ( char*, char*, WidgetClass, Display*, ArgList, Cardinal ) = 0;
+Widget (*CDEIntegrator::pXtVaCreateManagedWidget)
+ ( char*, WidgetClass, Widget, ... ) = 0;
+void (*CDEIntegrator::pXtDisplayInitialize)
+ ( XtAppContext, Display*, char*, char*, XrmOptionDescRec*, Cardinal,
+ int*, char**) = 0;
+void (*CDEIntegrator::pXtAppSetFallbackResources)
+ ( XtAppContext, char** ) = 0;
+Widget (*CDEIntegrator::pXtAppInitialize)
+ (XtAppContext*, char*, XrmOptionDescList, Cardinal, int*, char**, char**,
+ ArgList, Cardinal ) = 0;
+Widget (*CDEIntegrator::pXtSetLanguageProc)
+ ( XtAppContext, XtLanguageProc, XtPointer ) = 0;
+DtActionInvocationID (*CDEIntegrator::pDtActionInvoke)
+ ( Widget, char*, DtActionArg*, int, char*, char*, char*, int,
+ DtActionCallbackProc, XtPointer ) = 0;
+void (*CDEIntegrator::pXtRealizeWidget)( Widget ) = 0;
+void (*CDEIntegrator::pXtUnrealizeWidget)( Widget ) = 0;
+XLIB_Boolean (*CDEIntegrator::pXtIsRealized)( Widget ) = 0;
+void (*CDEIntegrator::pXtConfigureWidget)
+ ( Widget, Position, Position, Dimension, Dimension, Dimension ) = 0;
+void (*CDEIntegrator::pXtAppProcessEvent)
+ ( XtAppContext, XtInputMask ) = 0;
+XtInputMask (*CDEIntegrator::pXtAppPending)( XtAppContext ) = 0;
+WidgetClass* CDEIntegrator::pAppShellClass = 0;
+
+
+CDEIntegrator::CDEIntegrator( SalFrame* pFrame ) :
+ DtIntegrator( pFrame ),
+ maAppWidget( 0 )
+{
+ meType = DtCDE;
+ if( ! nRefCount )
+ GlobalInit();
+ nRefCount++;
+
+ // instanz daten initialisieren
+ maAppContext = pXtCreateApplicationContext();
+ pXtDisplayInitialize( maAppContext, mpDisplay,
+ "OfficeCDEIntegrationShell",
+ "OfficeCDEIntegrationShell",
+ 0, 0, &nDummyArgc, ppDummyArgv );
+ pXtAppSetFallbackResources( maAppContext, pFallbackRes );
+ maAppWidget = pXtAppCreateShell( "OfficeCDEIntegrationShell",
+ "OfficeCDEIntegrationShell",
+ *pAppShellClass,
+ mpDisplay, 0, 0 );
+ pXtConfigureWidget( maAppWidget, 10, 10, 10, 10, 0 );
+ //pXtRealizeWidget( maAppWidget );
+ pDtAppInitialize( maAppContext, mpDisplay, maAppWidget,
+ ppDummyArgv[ 0 ], "Office" );
+
+ pDtDtsLoadDataTypes();
+}
+
+CDEIntegrator::~CDEIntegrator()
+{
+ if( maAppWidget )
+ pXtUnrealizeWidget( maAppWidget );
+
+ nRefCount--;
+ if( ! nRefCount )
+ GlobalDeInit();
+}
+
+void CDEIntegrator::GlobalInit()
+{
+ if( ! pDtSvcLib )
+ pDtSvcLib = _LoadLibrary( "libDtSvc.so" );
+ if( ! pttLib )
+ pttLib = _LoadLibrary( "libtt.so" );
+ if( ! pXmLib )
+ pXmLib = _LoadLibrary( "libXm.so" );
+ if( ! pMrmLib )
+ pMrmLib = _LoadLibrary( "libMrm.so" );
+ if( ! pXtLib )
+ pXtLib = _LoadLibrary( "libXt.so" );
+
+ if( pDtSvcLib && pXtLib && pttLib && pXmLib && pMrmLib )
+ {
+ bSymbolLoadFailed = FALSE;
+
+ pDtAppInitialize = (XLIB_Boolean (*)( XtAppContext, Display*,
+ Widget, char*, char* ))
+ _LoadSymbol( pDtSvcLib, "DtAppInitialize" );
+ pDtDtsLoadDataTypes = (void (*)())
+ _LoadSymbol( pDtSvcLib, "DtDtsLoadDataTypes" );
+ pDtDtsRelease = (void (*)())
+ _LoadSymbol( pDtSvcLib, "DtDtsRelease" );
+ pDtDtsFileToAttributeValue = (char* (*)(const char*,const char*))
+ _LoadSymbol( pDtSvcLib, "DtDtsFileToAttributeValue" );
+ pDtDtsFreeAttributeValue = (void (*)( char* ))
+ _LoadSymbol( pDtSvcLib, "DtDtsFreeAttributeValue" );
+ pDtActionInvoke = (DtActionInvocationID(*)
+ ( Widget, char*,DtActionArg*, int, char*,
+ char*, char*, int,
+ DtActionCallbackProc, XtPointer ))
+ _LoadSymbol( pDtSvcLib, "DtActionInvoke" );
+ pDtWsmGetWorkspaceInfo = (Status(*)( Display*, XLIB_Window, Atom,
+ DtWsmWorkspaceInfo** ))
+ _LoadSymbol( pDtSvcLib, "DtWsmGetWorkspaceInfo" );
+ pDtWsmFreeWorkspaceInfo = (void(*)( DtWsmWorkspaceInfo* ))
+ _LoadSymbol( pDtSvcLib, "DtWsmFreeWorkspaceInfo" );
+ pDtWsmGetWorkspaceList = (Status(*)( Display*, XLIB_Window, Atom**, int* ))
+ _LoadSymbol( pDtSvcLib, "DtWsmGetWorkspaceList" );
+ pDtWsmGetCurrentWorkspace = (Status(*)( Display*, XLIB_Window, Atom*))
+ _LoadSymbol( pDtSvcLib, "DtWsmGetCurrentWorkspace" );
+ pDtWsmGetWorkspacesOccupied = (Status(*)( Display*, XLIB_Window, Atom**, unsigned long* ))
+ _LoadSymbol( pDtSvcLib, "DtWsmGetWorkspacesOccupied" );
+
+ pXtToolkitInitialize = (void (*)())
+ _LoadSymbol( pXtLib, "XtToolkitInitialize" );
+ pXtCreateApplicationContext = (XtAppContext (*)())
+ _LoadSymbol( pXtLib, "XtCreateApplicationContext" );
+ pXtAppCreateShell = (Widget (*)( char*, char*, WidgetClass,
+ Display*, ArgList,
+ Cardinal ))
+ _LoadSymbol( pXtLib, "XtAppCreateShell" );
+ pXtDisplayInitialize = (void (*)( XtAppContext, Display*, char*,
+ char*, XrmOptionDescRec*, Cardinal,
+ int*, char**) )
+ _LoadSymbol( pXtLib, "XtDisplayInitialize" );
+
+ pXtVaCreateManagedWidget = (Widget (*)( char*, WidgetClass, Widget, ... ))
+ _LoadSymbol( pXtLib, "XtVaCreateManagedWidget" );
+ pXtSetLanguageProc = (Widget (*)( XtAppContext, XtLanguageProc, XtPointer ))
+ _LoadSymbol( pXtLib, "XtSetLanguageProc" );
+ pXtAppSetFallbackResources = (void (*)( XtAppContext, char** ))
+ _LoadSymbol( pXtLib, "XtAppSetFallbackResources" );
+ pXtAppInitialize = (Widget (*)(XtAppContext*, char*, XrmOptionDescList,
+ Cardinal, int*, char**, char**, ArgList,
+ Cardinal ))
+ _LoadSymbol( pXtLib, "XtAppInitialize" );
+ pXtRealizeWidget = (void(*)( Widget ))
+ _LoadSymbol( pXtLib, "XtRealizeWidget" );
+ pXtIsRealized = (XLIB_Boolean(*)( Widget ))
+ _LoadSymbol( pXtLib, "XtIsRealized" );
+ pXtUnrealizeWidget = (void(*)( Widget ))
+ _LoadSymbol( pXtLib, "XtUnrealizeWidget" );
+ pXtAppProcessEvent = (void(*)( XtAppContext, XtInputMask ))
+ _LoadSymbol( pXtLib, "XtAppProcessEvent" );
+ pXtAppPending = (XtInputMask(*)( XtAppContext ))
+ _LoadSymbol( pXtLib, "XtAppPending" );
+ pXtConfigureWidget = (void (*)( Widget, Position, Position, Dimension,
+ Dimension, Dimension ))
+ _LoadSymbol( pXtLib, "XtConfigureWidget" );
+ pAppShellClass =
+ (WidgetClass*)_LoadSymbol( pXtLib, "applicationShellWidgetClass" );
+ pMrmInitialize = (void(*)())
+ _LoadSymbol( pMrmLib, "MrmInitialize" );
+ pxmDrawingAreaWidgetClass =
+ (WidgetClass*)_LoadSymbol( pXmLib, "xmDrawingAreaWidgetClass" );
+ pxmRowColumnWidgetClass =
+ (WidgetClass*)_LoadSymbol( pXmLib, "xmRowColumnWidgetClass" );
+ pxmPushButtonWidgetClass =
+ (WidgetClass*)_LoadSymbol( pXmLib, "xmPushButtonWidgetClass" );
+
+ pXtSetLanguageProc( NULL, NULL, NULL );
+ pMrmInitialize();
+ pXtToolkitInitialize();
+ XrmInitialize();
+ }
+ else
+ {
+ if( pXtLib )
+ dlclose( pXtLib );
+ if( pXmLib )
+ dlclose( pXmLib );
+ if( pMrmLib )
+ dlclose( pMrmLib );
+ if( pttLib )
+ dlclose( pttLib );
+ if( pDtSvcLib )
+ dlclose( pDtSvcLib );
+ pttLib = pMrmLib = pXmLib = pXtLib = pDtSvcLib = 0;
+ }
+}
+
+void CDEIntegrator::GlobalDeInit()
+{
+ pDtDtsRelease();
+
+ if( pXtLib )
+ dlclose( pXtLib );
+ if( pXmLib )
+ dlclose( pXmLib );
+ if( pMrmLib )
+ dlclose( pMrmLib );
+ if( pttLib )
+ dlclose( pttLib );
+ if( pDtSvcLib )
+ dlclose( pDtSvcLib );
+ pttLib = pMrmLib = pXmLib = pXtLib = pDtSvcLib = 0;
+}
+
+void CDEIntegrator::InvokeAction( const String& rAction, const String& rFiles )
+{
+#if 1
+ String aActionLine( RTL_CONSTASCII_STRINGPARAM( "/usr/dt/bin/dtaction " ), RTL_TEXTENCODING_ASCII_US );
+ aActionLine += rAction;
+ aActionLine += ' ';
+ aActionLine += rFiles;
+ DtIntegrator::LaunchProcess( aActionLine );
+#else
+ int nTokens = GetCommandLineTokenCount( rFiles ), i;
+ DtActionArg* pArgs = new DtActionArg[ nTokens ];
+ char** pStrings = new char*[nTokens];
+ for( i = 0; i < nTokens ; i++ )
+ {
+ pStrings[ i ] = strdup( GetCommandLineToken( i, rFiles ).GetStr() );
+ pArgs[ i ].argClass = DtACTION_FILE;
+ pArgs[ i ].u.file.name = pStrings[ i ];
+ }
+
+ pid_t nPID = fork();
+ if( ! nPID )
+ // child
+ {
+ // if the action fails for some reason, CDE tries to raise
+ // an error box which leads to a SIGSEGV somewhere
+ // in Motif (probably because we are not a real Motif app)
+ // so execute this in its own process. if it dies, so what ?
+
+ // this is not perfectly safe though. The second process
+ // can cause an X Error wich comes back through our connection
+ // at an unpredictable time. Some Actions do this reproducable
+ // eg SDTAudio
+ pDtActionInvoke( maAppWidget, const_cast<char*>(rAction.GetStr()), pArgs, nTokens,
+ NULL, NULL, NULL, True, NULL, NULL );
+ _exit(0);
+ }
+ else
+ // parent
+ if( nPID > 0 )
+ waitpid( nPID, NULL, 0 );
+
+ // dtactioninvoke pops up the widget, pop it down again
+ if( pXtIsRealized( maAppWidget ) )
+ pXtUnrealizeWidget( maAppWidget );
+
+ for( i = 0; i < nTokens; i++ )
+ free( pStrings[i] );
+ delete pStrings;
+ delete pArgs;
+#endif
+}
+
+BOOL CDEIntegrator::StartProcess( String& rFile, String& rParams, const String& rDir )
+{
+ String aFiles;
+ if( rFile.GetChar( 0 ) != '"' )
+ {
+ aFiles = '\"';
+ aFiles += rFile;
+ aFiles += '\"';
+ }
+ else
+ aFiles = rFile;
+
+ if( rParams.Len() )
+ {
+ aFiles += ' ';
+ aFiles += rParams;
+ }
+ // first try to launch it
+ if( LaunchProcess( aFiles, rDir ) )
+ return TRUE;
+
+ // if not successfull it must be a file of whatever type
+ // look for an apropriate action
+ ByteString aFile( rFile, gsl_getSystemTextEncoding() );
+ char* pAttrValue = pDtDtsFileToAttributeValue( aFile.GetBuffer(), "ACTIONS" );
+ if( pAttrValue )
+ {
+ // there is an action for this file. invoke the first one
+ // (since we do not know which one
+ String aAction( pAttrValue, strlen( pAttrValue ), gsl_getSystemTextEncoding() );
+ pDtDtsFreeAttributeValue( pAttrValue );
+ aAction =
+ WhitespaceToSpace( aAction.GetToken( 0, ',' ) ).GetToken( 0, ' ' );
+ if( ! aAction.Len() )
+ return FALSE;
+
+ BOOL bPreviousState =
+ mpSalDisplay->GetXLib()->GetIgnoreXErrors();
+ mpSalDisplay->GetXLib()->SetIgnoreXErrors( TRUE );
+
+ InvokeAction( aAction, aFiles );
+
+ XSync( mpDisplay, False );
+ mpSalDisplay->GetXLib()->SetIgnoreXErrors( bPreviousState );
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+static int getHexDigit( const char c )
+{
+ if( c >= '0' && c <= '9' )
+ return (int)(c-'0');
+ else if( c >= 'a' && c <= 'f' )
+ return (int)(c-'a'+10);
+ else if( c >= 'A' && c <= 'F' )
+ return (int)(c-'A'+10);
+ return -1;
+}
+
+
+BOOL CDEIntegrator::GetSystemLook( SystemLookInfo& rInfo )
+{
+ static Color aColors[ 8 ];
+ static sal_Bool bRead = sal_False;
+
+ if( ! bRead )
+ {
+ // get used palette from xrdb
+ char **ppStringList = 0;
+ int nStringCount;
+ XTextProperty aTextProperty;
+ aTextProperty.value = 0;
+ int i;
+
+ static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False );
+
+ if( XGetTextProperty( mpDisplay,
+ RootWindow( mpDisplay, 0 ),
+ &aTextProperty,
+ nResMgrAtom )
+ && aTextProperty.value
+ && XTextPropertyToStringList( &aTextProperty, &ppStringList, &nStringCount )
+ )
+ {
+ // format of ColorPalette resource:
+ // *n*ColorPalette: palettefile
+
+ ByteString aLines;
+ for( i=0; i < nStringCount; i++ )
+ aLines += ppStringList[i];
+ for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- )
+ {
+ ByteString aLine = aLines.GetToken( i, '\n' );
+ int nIndex = aLine.Search( "ColorPalette" );
+ if( nIndex != STRING_NOTFOUND )
+ {
+ int nPos = nIndex;
+
+ nIndex+=12;
+ const char* pStr = aLine.GetBuffer() +nIndex;
+ while( *pStr && isspace( *pStr ) && *pStr != ':' )
+ {
+ pStr++;
+ nIndex++;
+ }
+ if( *pStr != ':' )
+ continue;
+ pStr++, nIndex++;
+ for( ; *pStr && isspace( *pStr ); pStr++, nIndex++ )
+ ;
+ if( ! *pStr )
+ continue;
+ int nIndex2 = nIndex;
+ for( ; *pStr && ! isspace( *pStr ); pStr++, nIndex2++ )
+ ;
+ ByteString aPaletteFile( aLine.Copy( nIndex, nIndex2 - nIndex ) );
+ // extract number before ColorPalette;
+ for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
+ ;
+ nPos--;
+ for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
+ ;
+ int nNumber = aLine.Copy( ++nPos ).ToInt32();
+
+ DBG_TRACE2( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() );
+
+ // found no documentation what this number actually means;
+ // might be the screen number. 0 seems to be the right one
+ // in most cases.
+ if( nNumber )
+ continue;
+
+ DBG_TRACE1( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() );
+
+ String aPath( aHomeDir );
+ aPath.AppendAscii( "/.dt/palettes/" );
+ aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
+
+ SvFileStream aStream( aPath, STREAM_READ );
+ if( ! aStream.IsOpen() )
+ {
+ aPath = String::CreateFromAscii( "/usr/dt/palettes/" );
+ aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
+ aStream.Open( aPath, STREAM_READ );
+ if( ! aStream.IsOpen() )
+ continue;
+ }
+
+ ByteString aBuffer;
+ for( nIndex = 0; nIndex < 8; nIndex++ )
+ {
+ aStream.ReadLine( aBuffer );
+ // format is "#RRRRGGGGBBBB"
+
+ DBG_TRACE1( "\t\"%s\".\n", aBuffer.GetBuffer() );
+
+ if( aBuffer.Len() )
+ {
+ const char* pArr = (const char*)aBuffer.GetBuffer()+1;
+ aColors[nIndex] = Color(
+ getHexDigit( pArr[1] )
+ | ( getHexDigit( pArr[0] ) << 4 ),
+ getHexDigit( pArr[5] )
+ | ( getHexDigit( pArr[4] ) << 4 ),
+ getHexDigit( pArr[9] )
+ | ( getHexDigit( pArr[8] ) << 4 )
+ );
+
+ DBG_TRACE1( "\t\t%lx\n", aColors[nIndex].GetColor() );
+ }
+ }
+
+ break;
+ }
+ }
+ }
+
+ if( ppStringList )
+ XFreeStringList( ppStringList );
+ if( aTextProperty.value )
+ XFree( aTextProperty.value );
+ }
+
+ rInfo.windowActiveStart = aColors[0];
+ rInfo.windowActiveEnd = aColors[0];
+ rInfo.activeBorder = aColors[0];
+
+ rInfo.windowInactiveStart = aColors[1];
+ rInfo.windowInactiveEnd = aColors[1];
+ rInfo.inactiveBorder = aColors[1];
+
+ rInfo.activeForeground =
+ aColors[ 0 ].GetBlue() < 128 ||
+ aColors[ 0 ].GetGreen() < 128 ||
+ aColors[ 0 ].GetRed() < 128
+ ? Color( COL_WHITE ) : Color( COL_BLACK );
+ rInfo.inactiveForeground =
+ aColors[ 1 ].GetBlue() < 128 ||
+ aColors[ 1 ].GetGreen() < 128 ||
+ aColors[ 1 ].GetRed() < 128
+ ? Color( COL_WHITE ) : Color( COL_BLACK );
+ rInfo.foreground = rInfo.inactiveForeground;
+ rInfo.background = aColors[ 1 ];
+
+ return TRUE;
+}
diff --git a/vcl/unx/source/gdi/dtint.cxx b/vcl/unx/source/gdi/dtint.cxx
new file mode 100644
index 000000000000..d851d48f27f0
--- /dev/null
+++ b/vcl/unx/source/gdi/dtint.cxx
@@ -0,0 +1,1169 @@
+/*************************************************************************
+ *
+ * $RCSfile: dtint.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <prex.h>
+#include <X11/Xatom.h>
+#include <X11/keysym.h>
+#include <postx.h>
+
+#include <cdeint.hxx>
+#include <kdeint.hxx>
+#include <soicon.hxx>
+#include <saldisp.hxx>
+#include <saldata.hxx>
+#include <salbmp.hxx>
+#include <salframe.hxx>
+
+#include <strhelper.hxx>
+#include <svapp.hxx>
+
+#include <unistd.h>
+
+#ifndef _VOS_PROCESS_HXX
+#include <vos/process.hxx>
+#endif
+
+#include <tools/urlobj.hxx>
+
+#ifdef SOLARIS
+// Solaris 2.5.1 misses it in unistd.h
+extern "C" int usleep(unsigned int);
+#endif
+
+#define MAX_TRY_CONVERTSELECTION 40
+#define EVENTMASK_WHILE_DRAGGING ButtonPressMask | ButtonReleaseMask | PointerMotionMask
+
+BOOL bSymbolLoadFailed = FALSE;
+
+DtIntegratorList DtIntegrator::aIntegratorList;
+String DtIntegrator::aHomeDir;
+
+DtIntegrator::DtIntegrator( SalFrame* pFrame ) :
+ mpSalFrame( pFrame ),
+ mpSalDisplay( pFrame->maFrameData.GetDisplay() ),
+ meType( DtGeneric ),
+ mnRefCount( 0 ),
+ mpLastData( 0 ),
+ maDropSource( None ),
+ mpDropTarget( NULL ),
+ maDragTarget( None ),
+ meDragState( DtDragNone )
+{
+ mpDisplay = mpSalDisplay->GetDisplay();
+ maSelectionWindow =
+ XCreateSimpleWindow( mpDisplay, DefaultRootWindow( mpDisplay ),
+ 10,10,10,10,0,0,1 );
+ mnClipboardAtom = XInternAtom( mpDisplay, "CLIPBOARD", False );
+ mnTargetsAtom = XInternAtom( mpDisplay, "TARGETS", False );
+ mnCompoundAtom = XInternAtom( mpDisplay, "COMPOUND_TEXT", False );
+ maExPropertyAtom = XInternAtom( mpDisplay, "VCLExchangeProperty", False );
+
+ mnXdndAware = XInternAtom( mpDisplay, "XdndAware", False );
+ mnXdndSelection = XInternAtom( mpDisplay, "XdndSelection", False );
+ mnXdndEnter = XInternAtom( mpDisplay, "XdndEnter", False );
+ mnXdndLeave = XInternAtom( mpDisplay, "XdndLeave", False );
+ mnXdndStatus = XInternAtom( mpDisplay, "XdndStatus", False );
+ mnXdndTypeList = XInternAtom( mpDisplay, "XdndTypeList", False );
+ mnXdndPosition = XInternAtom( mpDisplay, "XdndPosition", False );
+ mnXdndDrop = XInternAtom( mpDisplay, "XdndDrop", False );
+ mnXdndActionCopy = XInternAtom( mpDisplay, "XdndActionCopy", False );
+ mnXdndActionMove = XInternAtom( mpDisplay, "XdndActionMove", False );
+ mnXdndActionLink = XInternAtom( mpDisplay, "XdndActionLink", False );
+ mnXdndActionCopy = XInternAtom( mpDisplay, "XdndActionCopy", False );
+ mnXdndActionAsk = XInternAtom( mpDisplay, "XdndActionAsk", False );
+ mnXdndActionDescription = XInternAtom( mpDisplay, "XdndActionDescription", False );
+ mnXdndFinished = XInternAtom( mpDisplay, "XdndFinished", False ); mnXdndActionList = XInternAtom( mpDisplay, "XdndActionList", False );
+
+ aIntegratorList.Insert( this, LIST_APPEND );
+ aHomeDir = String( getenv( "HOME" ), gsl_getSystemTextEncoding() );
+}
+
+DtIntegrator::~DtIntegrator()
+{
+ XDestroyWindow( mpDisplay, maSelectionWindow );
+ if( mpLastData )
+ delete mpLastData;
+ while( maDropTypes.Count() )
+ delete maDropTypes.Remove( (ULONG)0 );
+ while( maDragTypes.Count() )
+ delete maDragTypes.Remove( (ULONG)0 );
+}
+
+BOOL DtIntegrator::CheckUnxClipboardChanged()
+{
+ XLIB_Window aPrimWindow = XGetSelectionOwner( mpDisplay, XA_PRIMARY );
+ XLIB_Window aClipWindow = XGetSelectionOwner( mpDisplay, mnClipboardAtom );
+
+ if( aPrimWindow != maSelectionWindow && aPrimWindow != None )
+ return TRUE;
+ if( aClipWindow != maSelectionWindow && aClipWindow != None )
+ return TRUE;
+ return FALSE;
+}
+
+void DtIntegrator::Copy( DtData* pData )
+{
+ if( mpLastData )
+ delete mpLastData;
+ mpLastData = pData;
+
+ XSetSelectionOwner( mpDisplay, XA_PRIMARY,
+ maSelectionWindow, CurrentTime );
+ XSetSelectionOwner( mpDisplay, mnClipboardAtom,
+ maSelectionWindow, CurrentTime );
+
+#if defined DBG_UTIL || defined DEBUG
+ if( XGetSelectionOwner( mpDisplay, XA_PRIMARY ) != maSelectionWindow )
+ fprintf( stderr, "Could not acquire ownership of PRIMARY\n" );
+ if( XGetSelectionOwner( mpDisplay, mnClipboardAtom ) !=
+ maSelectionWindow )
+ fprintf( stderr, "Could not acquire ownership of CLIPBOARD\n" );
+#endif
+}
+
+void DtIntegrator::RegisterDropzone( SalFrame* pFrame )
+{
+ for( int i = 0; i < maDropzones.Count(); i++ )
+ {
+ if( maDropzones.GetObject( i ) == pFrame )
+ return;
+ }
+ maDropzones.Insert( pFrame, LIST_APPEND );
+
+ // create XdndAware property on window to acknowledge DND awareness
+ static int nVersion = XDND_PROTOCOL_VERSION;
+ XChangeProperty( mpDisplay, pFrame->maFrameData.GetWindow(),
+ mnXdndAware, XA_ATOM, 32, PropModeReplace,
+ (unsigned char*)(&nVersion), 1 );
+
+ ImplRegisterDropzone( pFrame );
+}
+
+void DtIntegrator::UnregisterDropzone( SalFrame* pFrame )
+{
+ maDropzones.Remove( pFrame );
+
+ XDeleteProperty( mpDisplay, pFrame->maFrameData.GetWindow(), mnXdndAware );
+
+ ImplUnregisterDropzone( pFrame );
+}
+
+void DtIntegrator::ImplRegisterDropzone( SalFrame* pFrame )
+{
+}
+
+void DtIntegrator::ImplUnregisterDropzone( SalFrame* pFrame )
+{
+}
+
+void DtIntegrator::ImplHandleXEvent( XEvent* pEvent )
+{
+ if( pEvent->type == SelectionClear )
+ {
+ if( meDragState != DtDragNone &&
+ pEvent->xselectionclear.selection == mnXdndSelection )
+ {
+ meDragState = DtDragNone;
+ maDragSource = None;
+ maDragTarget = None;
+ }
+ else
+ maClipboardChangedHdl.Call( this );
+ }
+ else if( pEvent->type == SelectionRequest )
+ {
+ BOOL bConvertable = FALSE;
+ XSelectionRequestEvent& rSelEvent = pEvent->xselectionrequest;
+ XEvent aSendEvent;
+ aSendEvent.type = SelectionNotify;
+ aSendEvent.xselection.display = rSelEvent.display;
+ aSendEvent.xselection.send_event = True;
+ aSendEvent.xselection.requestor = rSelEvent.requestor;
+ aSendEvent.xselection.selection = rSelEvent.selection;
+ aSendEvent.xselection.time = rSelEvent.time;
+ // xterm seems to be the only one to care about time = CurrentTime
+
+ // clipboard and xdnd requests land here
+ if( rSelEvent.selection == XA_PRIMARY ||
+ rSelEvent.selection == mnClipboardAtom )
+ {
+
+#if defined DEBUG
+ char* pType = XGetAtomName( mpDisplay, rSelEvent.target );
+ fprintf( stderr, "Request for conversion of %s with type \"%s\"\n",
+
+ rSelEvent.selection == XA_PRIMARY ? "PRIMARY" : "CLIPBOARD", pType );
+ XFree( pType );
+#endif
+ if( ( rSelEvent.target == XA_STRING ||
+ rSelEvent.target == mnCompoundAtom )
+ && mpLastData && mpLastData->mnBytes )
+ {
+ bConvertable = TRUE;
+ XChangeProperty( mpDisplay, rSelEvent.requestor,
+ rSelEvent.property, XA_STRING,
+ 8, PropModeReplace,
+ mpLastData->mpBytes,
+ mpLastData->mnBytes );
+ aSendEvent.xselection.target = rSelEvent.target;
+ }
+ else if( rSelEvent.target == mnTargetsAtom )
+ {
+ bConvertable = TRUE;
+ Atom aAtom = XA_STRING;
+ XChangeProperty( mpDisplay, rSelEvent.requestor,
+ rSelEvent.property, XA_ATOM,
+ 32, PropModeReplace,
+ (unsigned char*)&aAtom, 1 );
+ aSendEvent.xselection.target = mnTargetsAtom;
+ }
+ }
+ else if( rSelEvent.selection == mnXdndSelection && meDragState != DtDragNone )
+ {
+ DtData aData;
+ aData.mpType = (unsigned char*)XGetAtomName( mpDisplay, rSelEvent.target );
+#if defined DEBUG
+ fprintf( stderr, "Request for convertion of XdndSelection with type \"%s\"\n", aData.mpType );
+#endif
+ maQueryDragDataHdl.Call( &aData );
+ if( aData.mnBytes > 0 )
+ {
+ bConvertable = TRUE;
+ XChangeProperty( mpDisplay, rSelEvent.requestor,
+ rSelEvent.property, rSelEvent.target,
+ 8, PropModeReplace,
+ aData.mpBytes,
+ aData.mnBytes );
+ aSendEvent.xselection.target = rSelEvent.target;
+ }
+ XFree( aData.mpType );
+ // drag and drop does NOT end here
+ // the target may ask more than once for the data
+ // hopefully this can work with the office
+ }
+ aSendEvent.xselection.property =
+ bConvertable ? rSelEvent.property : None;
+ if( ! XSendEvent( mpDisplay, rSelEvent.requestor,
+ False, 0, &aSendEvent ) )
+ fprintf( stderr, "HandleSelectionRequest: XSendEvent failed\n" );
+ }
+ else if( pEvent->type == ClientMessage )
+ {
+ int i = pEvent->xclient.message_type;
+
+ if( i == mnXdndEnter &&
+ ( pEvent->xclient.data.l[1] >> 24 ) <= XDND_PROTOCOL_VERSION &&
+ ! mpDropTarget )
+ {
+#if defined DEBUG
+ fprintf( stderr, "XdndEnter with XDND protocol version %d\n",
+ pEvent->xclient.data.l[1] >> 24 );
+#endif
+ // a drop begins
+
+ // search the correct target frame
+ for( i = 0; i < maDropzones.Count(); i++ )
+ {
+ SalFrame *pFrame = maDropzones.GetObject( i );
+ if( pFrame->maFrameData.GetWindow() ==
+ pEvent->xclient.window )
+ {
+ mpDropTarget = pFrame;
+ break;
+ }
+ }
+ if( ! mpDropTarget )
+ {
+#if defined DEBUG || defined DBG_UTIL
+ fprintf( stderr, "Received XdndEnter and have no corresponding dropzone !!!\n" );
+#endif
+ return;
+ }
+
+ maDropSource = pEvent->xclient.data.l[0];
+ // build a stringlist of types
+ while( maDropTypes.Count() )
+ delete maDropTypes.Remove( (ULONG)0 );
+ for( int i = 2; i < 5; i++ )
+ {
+ if( pEvent->xclient.data.l[i] != None )
+ {
+ char *pAtomName = XGetAtomName( mpDisplay, pEvent->xclient.data.l[i] );
+ maDropTypes.Insert( new String( pAtomName, RTL_TEXTENCODING_ISO_8859_1 ) );
+ XFree( pAtomName );
+ }
+ }
+ if( maDropTypes.Count() > 2 && (pEvent->xclient.data.l[1] & 1) )
+ {
+ unsigned long nCount;
+ Atom aType;
+ int nFormat;
+ unsigned long nBytesLeft;
+ Atom* pTypeData = 0;
+ if( XGetWindowProperty( mpDisplay, maDropSource,
+ mnXdndTypeList, 0, 256,
+ False, XA_ATOM,
+ &aType, &nFormat,
+ &nCount, &nBytesLeft,
+ (unsigned char**)(&pTypeData) ) )
+ {
+ if( aType == XA_ATOM && nFormat == 32 && nCount )
+ {
+ while( nCount )
+ {
+ char * pTypeName =
+ XGetAtomName( mpDisplay, pTypeData[ --nCount ] );
+ maDropTypes.Insert( new String( pTypeData[ nCount ], RTL_TEXTENCODING_ISO_8859_1 ) );
+ }
+ }
+ if( pTypeData )
+ XFree( pTypeData );
+ }
+ }
+
+ maBeginDropHdl.Call( NULL );
+ }
+ else if( i == mnXdndPosition && maDropSource != None && mpDropTarget )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Received XdndPosition\n" );
+#endif
+ // remember time stamps
+ mnDropDataTime = pEvent->xclient.data.l[3];
+
+ // put x,y and action into a structure here
+ DtDropQuery aDropQuery;
+ aDropQuery.m_pFrame = mpDropTarget;
+ int x = pEvent->xclient.data.l[2] >> 16;
+ int y = pEvent->xclient.data.l[2] & 0xffff;
+ XLIB_Window aChild;
+ XTranslateCoordinates( mpDisplay, DefaultRootWindow( mpDisplay ),
+ mpDropTarget->maFrameData.GetWindow(),
+ x, y,
+ &aDropQuery.m_nX,
+ &aDropQuery.m_nY,
+ &aChild );
+ if( pEvent->xclient.data.l[4] == mnXdndActionLink )
+ aDropQuery.m_eAction = DtDropLink;
+ else if( pEvent->xclient.data.l[4] == mnXdndActionMove )
+ aDropQuery.m_eAction = DtDropMove;
+ else
+ aDropQuery.m_eAction = DtDropCopy;
+
+ mnLastDropX = aDropQuery.m_nX;
+ mnLastDropY = aDropQuery.m_nY;
+
+ // query for dropping on new position
+ DtDropAction eResult = (DtDropAction)maQueryDropHdl.Call( &aDropQuery );
+#if defined DEBUG
+ fprintf( stderr, "QueryDropHdl returned result " );
+ switch( eResult )
+ {
+ case DtDropNone: fprintf( stderr, "DtDropNone\n\n" );break;
+ case DtDropCopy: fprintf( stderr, "DtDropCopy\n\n" );break;
+ case DtDropLink: fprintf( stderr, "DtDropLink\n\n" );break;
+ case DtDropMove: fprintf( stderr, "DtDropMove\n\n" );break;
+ case DtDropAny: fprintf( stderr, "DtDropAny\n\n" );break;
+ default: fprintf( stderr, "Unknown !!!\n\n" );break;
+ }
+#endif
+
+ // give source a status
+ XEvent aSendEvent;
+ aSendEvent.type = ClientMessage;
+ aSendEvent.xclient.display = mpDisplay;
+ aSendEvent.xclient.window = maDropSource;
+ aSendEvent.xclient.message_type = mnXdndStatus;
+ aSendEvent.xclient.format = 32;
+ aSendEvent.xclient.data.l[0] = mpDropTarget->maFrameData.GetWindow();
+ aSendEvent.xclient.data.l[1] = 2;
+ switch( eResult )
+ {
+ case DtDropCopy:
+ case DtDropMove:
+ case DtDropLink:
+ case DtDropAny:
+ aSendEvent.xclient.data.l[1] |= 1;
+ default: ;
+ }
+ aSendEvent.xclient.data.l[2] = 0;
+ aSendEvent.xclient.data.l[3] = 0;
+ if( eResult == DtDropCopy )
+ aSendEvent.xclient.data.l[4] = mnXdndActionCopy;
+ else if( eResult == DtDropMove )
+ aSendEvent.xclient.data.l[4] = mnXdndActionMove;
+ else if( eResult == DtDropLink )
+ aSendEvent.xclient.data.l[4] = mnXdndActionLink;
+ else
+ aSendEvent.xclient.data.l[4] = None;
+ XSendEvent( mpDisplay, maDropSource, False, NoEventMask, &aSendEvent );
+ }
+ else if( i == mnXdndLeave && maDropSource != None )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Received XdndLeave\n" );
+#endif
+ if( pEvent->xclient.data.l[0] == maDropSource )
+ {
+ maDropSource = None;
+ mpDropTarget = NULL;
+
+ DtDropQuery aDropQuery;
+ aDropQuery.m_nX = mnLastDropX;
+ aDropQuery.m_nY = mnLastDropY;
+ aDropQuery.m_eAction = DtDropNone;
+ aDropQuery.m_pFrame = mpDropTarget;
+ maDropFinishHdl.Call( &aDropQuery );
+
+ }
+ }
+ else if( i == mnXdndDrop && maDropSource != None )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Received XdndDrop\n" );
+#endif
+ // remember time stamps
+ mnDropDataTime = pEvent->xclient.data.l[2];
+
+ DtDropQuery aDropQuery;
+ aDropQuery.m_nX = mnLastDropX;
+ aDropQuery.m_nY = mnLastDropY;
+ aDropQuery.m_eAction = DtDropAny;
+ aDropQuery.m_pFrame = mpDropTarget;
+ // the drop finish handler should relay the data types
+ // FinishDrop should be called then which retrieves the data
+ // FinishDrop must not be called after this handler returns
+ maDropFinishHdl.Call( &aDropQuery );
+ // finally send a drop finished
+ XEvent aSendEvent;
+ aSendEvent.type = ClientMessage;
+ aSendEvent.xclient.display = mpDisplay;
+ aSendEvent.xclient.window = maDropSource;
+ aSendEvent.xclient.message_type = mnXdndFinished;
+ aSendEvent.xclient.format = 32;
+ aSendEvent.xclient.data.l[0] = mpDropTarget->maFrameData.GetWindow();
+ aSendEvent.xclient.data.l[1] = 0;
+ aSendEvent.xclient.data.l[2] = 0;
+ aSendEvent.xclient.data.l[3] = 0;
+ aSendEvent.xclient.data.l[4] = 0;
+
+ XSendEvent( mpDisplay, maDropSource, True, NoEventMask, &aSendEvent );
+ maDropSource = None;
+ mpDropTarget = NULL;
+ }
+ else if( meDragState != DtDropNone &&
+ meDragState != DtWaitForDataRequest &&
+ pEvent->xclient.message_type == mnXdndStatus )
+ {
+ int nAction = pEvent->xclient.data.l[4];
+ // set pointer correctly
+ XLIB_Cursor aCursor;
+ if( pEvent->xclient.data.l[1] & 1 )
+ {
+ if( nAction == mnXdndActionCopy )
+ aCursor = mpSalDisplay->GetPointer( POINTER_COPYFILES );
+ else if( nAction == mnXdndActionMove )
+ aCursor = mpSalDisplay->GetPointer( POINTER_MOVEFILES );
+ else if( nAction == mnXdndActionLink )
+ aCursor = mpSalDisplay->GetPointer( POINTER_LINKFILE );
+ else
+ aCursor = mpSalDisplay->GetPointer( POINTER_CROP );
+ }
+ else
+ // target will not accept the drop
+ aCursor = mpSalDisplay->GetPointer( POINTER_NOTALLOWED );
+ XChangeActivePointerGrab( mpDisplay,
+ EVENTMASK_WHILE_DRAGGING,
+ aCursor, CurrentTime );
+#if defined DEBUG
+ char* pAction = nAction != None ?
+ XGetAtomName( mpDisplay, nAction ) : "None";
+ fprintf( stderr, "Received XdndStatus %s(%s)\n",
+ pEvent->xclient.data.l[1] & 1 ? "accept" : "deny",
+ pAction );
+ if( nAction != None )
+ XFree( pAction );
+#endif
+ meDragState = DtDragging;
+ SendXdndPosition( pEvent );
+ }
+ else if( meDragState != DtDragNone &&
+ pEvent->xclient.message_type == mnXdndFinished )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Received XdndFinished\n" );
+#endif
+ maDragTarget = None;
+ maDragSource = None;
+ meDragState = DtDragNone;
+ }
+ }
+ else if( pEvent->type == MotionNotify ||
+ pEvent->type == XLIB_KeyPress ||
+ pEvent->type == KeyRelease
+ )
+ {
+ if( pEvent->type == XLIB_KeyPress )
+ {
+ char sDummy[2];
+ sDummy[0] = sDummy[1] = 0;
+ KeySym nKeySym = 0;
+ XLookupString( &pEvent->xkey, sDummy, 1, &nKeySym, NULL );
+ if( nKeySym == XK_Escape )
+ meDragState = DtDragNone;
+ }
+ if( meDragState != DtDragNone &&
+ meDragState != DtWaitForDataRequest )
+
+ {
+ // find XdndAware window beneath pointer
+ int nXdndVersion;
+ XLIB_Window aWindow = GetXdndAwareWindowBeneathPointer( nXdndVersion, pEvent );
+ if( maDragTarget != aWindow )
+ {
+ // send a XdndLeave to previous window
+ SendXdndLeave();
+ // then send a XdndEnter to new window
+ maDragTarget = aWindow;
+ SendXdndEnter();
+ }
+ // send a XdndPosition
+ SendXdndPosition( pEvent );
+ }
+ else
+ CheckXdndTimeout( pEvent->xmotion.time );
+ }
+ else if( pEvent->type == ButtonRelease )
+ {
+ if( meDragState != DtDragNone &&
+ meDragState != DtWaitForDataRequest )
+ {
+ int nXdndVersion;
+ XLIB_Window aWindow = GetXdndAwareWindowBeneathPointer( nXdndVersion, pEvent );
+ if( maDragTarget != aWindow )
+ {
+ SendXdndLeave();
+ maDragTarget = aWindow;
+ SendXdndEnter();
+ SendXdndPosition( pEvent );
+ }
+ if( maDragTarget != None )
+ {
+ // send XdndDrop
+ XEvent aEvent;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = mpDisplay;
+ aEvent.xclient.window = maDragTarget;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = mnXdndDrop;
+ aEvent.xclient.data.l[0] = maDragSource;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] = pEvent->xbutton.time;
+ XSendEvent( mpDisplay, maDragTarget, False,
+ NoEventMask, &aEvent );
+#if defined DEBUG
+ fprintf( stderr, "Sending XdndDrop\n" );
+#endif
+ meDragState = DtWaitForDataRequest;
+ mnWaitTimestamp = pEvent->xbutton.time;
+ }
+ else
+ {
+#if defined DEBUG
+ fprintf( stderr, "Received ButtonRelease and no DragTarget\n" );
+#endif
+ maDragTarget = None;
+ maDragSource = None;
+ meDragState = DtDragNone;
+ }
+ }
+ else
+ CheckXdndTimeout( pEvent->xbutton.time );
+ }
+}
+
+DtData* DtIntegrator::DropFinish( const String& rType )
+{
+ ByteString aTypeString( rType, RTL_TEXTENCODING_ISO_8859_1 );
+#if defined DEBUG
+ fprintf( stderr, "DtIntegerator::DropFinish( \"%s\" ) : ", aTypeString.GetBuffer() );
+#endif
+ if( maDropSource == None || mpDropTarget == NULL )
+ {
+#if defined DEBUG
+ fprintf( stderr, "failed\n" );
+#endif
+ return NULL;
+ }
+
+ DtData* pData = new DtData;
+ pData->meType = DtTypeKnown;
+ pData->mnX = mnLastDropX;
+ pData->mnY = mnLastDropY;
+
+ Atom aType = XInternAtom( mpDisplay, aTypeString.GetBuffer(), False );
+
+ // now initiate communication with selection owner
+ XConvertSelection( mpDisplay, mnXdndSelection,
+ aType, maExPropertyAtom, maSelectionWindow, mnDropDataTime );
+ // wait for selection notify
+ XEvent aXEvent;
+ int nTries;
+ for( nTries = 0;
+ ! XCheckTypedEvent( mpDisplay, SelectionNotify, &aXEvent ) &&
+ nTries <= MAX_TRY_CONVERTSELECTION ;
+ nTries++ )
+ usleep( 50000 );
+
+ // check if request could be converted
+ if( nTries >= MAX_TRY_CONVERTSELECTION ||
+ aXEvent.xselection.property != maExPropertyAtom )
+ {
+ delete pData;
+ pData = 0;
+ }
+ else
+ {
+ Atom aActualType;
+ int nActualFormat;
+ unsigned long nItems;
+ unsigned long nBytesAfter;
+ unsigned char *pBytes=0;
+ XGetWindowProperty( mpDisplay, maSelectionWindow, maExPropertyAtom,
+ 0, // long_offset
+ 65536, // long_length, a maximum of 256k will be retrieved
+ True, // delete property after reading
+ aType, // the type we want
+ &aActualType, &nActualFormat,
+ &nItems, &nBytesAfter, &pBytes );
+
+ if( pBytes )
+ {
+ pData->mnBytes = nItems * (nActualFormat/8);
+ pData->mpBytes = new unsigned char[ pData->mnBytes + 1 ];
+ memcpy( pData->mpBytes, pBytes, pData->mnBytes );
+ pData->mpBytes[ pData->mnBytes ] = 0;
+ XFree( pBytes );
+ }
+ else
+ {
+ delete pData;
+ pData = 0;
+ }
+ }
+
+#if defined DEBUG
+ fprintf( stderr, "%s\n", pData ? "success" : "failed" );
+#endif
+ return pData;
+}
+
+DtData* DtIntegrator::Paste()
+{
+ DtData* pDtData = 0;
+
+ // check if there IS something to copy
+ XLIB_Window aOwner = XGetSelectionOwner( mpDisplay, XA_PRIMARY );
+ if( aOwner == None || aOwner == maSelectionWindow )
+ return 0;
+
+ // get the proper Atoms
+ Atom aTypeAtom = XA_STRING;
+
+ // now initiate communication with selection owner
+ XConvertSelection( mpDisplay, XA_PRIMARY, aTypeAtom, maExPropertyAtom,
+ maSelectionWindow, CurrentTime );
+ // wait for selection notify
+ XEvent aXEvent;
+ int nTries;
+ for( nTries = 0;
+ ! XCheckTypedEvent( mpDisplay, SelectionNotify, &aXEvent ) &&
+ nTries <= MAX_TRY_CONVERTSELECTION ;
+ nTries++ )
+ usleep( 50000 );
+
+ // check if request could be converted
+ if( nTries >= MAX_TRY_CONVERTSELECTION ||
+ aXEvent.xselection.property != maExPropertyAtom )
+ {
+ // let us try CLIPBOARD selection
+ XConvertSelection( mpDisplay, mnClipboardAtom, aTypeAtom,
+ maExPropertyAtom, maSelectionWindow, CurrentTime );
+ for( nTries = 0;
+ ! XCheckTypedEvent( mpDisplay, SelectionNotify, &aXEvent ) &&
+ nTries < MAX_TRY_CONVERTSELECTION ;
+ nTries++ )
+ usleep( 50000 );
+ }
+
+ // check if request could be converted
+ if( nTries >= MAX_TRY_CONVERTSELECTION ||
+ aXEvent.xselection.property != maExPropertyAtom )
+ return 0;
+
+ Atom aActualType;
+ int nActualFormat;
+ unsigned long nItems;
+ unsigned long nBytesAfter;
+ unsigned char *pData=0;
+ XGetWindowProperty( mpDisplay, maSelectionWindow, maExPropertyAtom,
+ 0, // long_offset
+ 16384, // long_length, a maximum of 64k will e retrieved
+ True, // delete property after reading
+ XA_STRING, // the type we want
+ &aActualType, &nActualFormat,
+ &nItems, &nBytesAfter, &pData );
+
+ if( pData )
+ {
+ pDtData = new DtData;
+ pDtData->meType = DtTypeText;
+ pDtData->mnBytes = nItems * (nActualFormat/8);
+ pDtData->mpBytes = new unsigned char[ pDtData->mnBytes + 1 ];
+ memcpy( pDtData->mpBytes, pData, pDtData->mnBytes );
+ pDtData->mpBytes[ pDtData->mnBytes ] = 0;
+ pDtData->mnBytes += 1;
+ XFree( pData );
+ return pDtData;
+ }
+ return 0;
+}
+
+BOOL DtIntegrator::StartProcess( String& rFile, String& rParams, const String& rDir )
+{
+ String aFiles( rFile );
+ if( rParams.Len() )
+ {
+ aFiles += ' ';
+ aFiles += rParams;
+ }
+ // try to launch it
+ return LaunchProcess( aFiles, rDir );
+}
+
+DtIntegrator* DtIntegrator::CreateDtIntegrator( SalFrame* pFrame )
+{
+ // hack for sclient
+ if( ! pFrame && aIntegratorList.Count() )
+ return aIntegratorList.GetObject( 0 );
+
+ for( int i = 0; i < aIntegratorList.Count(); i++ )
+ {
+ DtIntegrator* pIntegrator = aIntegratorList.GetObject( i );
+ if( pIntegrator->mpDisplay == pFrame->maFrameData.GetXDisplay() )
+ return pIntegrator;
+ }
+
+ if( ! pFrame )
+ pFrame = GetSalData()->pFirstFrame_;
+
+#ifndef REMOTE_APPSERVER
+ Display* pDisplay = pFrame->maFrameData.GetXDisplay();
+ Atom nDtAtom;
+ void* pLibrary = NULL;
+
+ // check dt type
+ // CDE
+ nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
+ if( nDtAtom && ( pLibrary = _LoadLibrary( "libDtSvc.so" ) ) )
+ {
+ // performance: do not dlopen DtSvc twice
+ CDEIntegrator::pDtSvcLib = pLibrary;
+ return new CDEIntegrator( pFrame );
+ }
+
+ nDtAtom = XInternAtom( pDisplay, "KWM_RUNNING", True );
+ if( nDtAtom ) // perhaps should check getenv( "KDEDIR" )
+ return new KDEIntegrator( pFrame );
+#endif
+ // default: generic implementation
+ return new DtIntegrator( pFrame );
+}
+
+void DtIntegrator::HandleXEvent( XEvent* pEvent )
+{
+ Display *pDisplay = pEvent->xany.display;
+ for( int i = 0; i < aIntegratorList.Count(); i++ )
+ {
+ DtIntegrator* pIntegrator = aIntegratorList.GetObject( i );
+ if( pIntegrator->mpDisplay == pDisplay )
+ {
+ pIntegrator->ImplHandleXEvent( pEvent );
+ break;
+ }
+ }
+}
+
+BOOL DtIntegrator::LaunchProcess( const String& rParam, const String& rDirectory )
+{
+ int nArg;
+
+ char *pDisplayName = DisplayString( mpDisplay );
+ int nToken = GetCommandLineTokenCount( rParam );
+
+ ::rtl::OUString* pArgs = new ::rtl::OUString[nToken];
+ for( nArg = 0; nArg < nToken ; nArg++ )
+ pArgs[ nArg ] = GetCommandLineToken( nArg, rParam );
+ NAMESPACE_VOS(OArgumentList) aArgList( pArgs+1, nToken-1 );
+ delete pArgs;
+
+ ::rtl::OUString aDisplay;
+ if( pDisplayName )
+ {
+ aDisplay = ::rtl::OUString::createFromAscii( "DISPLAY=" );
+ aDisplay += ::rtl::OUString::createFromAscii( pDisplayName );
+ }
+ NAMESPACE_VOS(OEnvironment) aEnvironment( 1, &aDisplay );
+
+ NAMESPACE_VOS( OProcess ) aOProcess( pArgs[0], rDirectory );
+
+ BOOL bSuccess = aOProcess.execute(
+ ( NAMESPACE_VOS( OProcess )::TProcessOption)
+ ( NAMESPACE_VOS( OProcess )::TOption_Detached |
+ NAMESPACE_VOS( OProcess )::TOption_SearchPath ),
+ aArgList, aEnvironment )
+ == NAMESPACE_VOS( OProcess )::E_None ? TRUE : FALSE;
+
+ return bSuccess;
+}
+
+DtDropAction DtIntegrator::ExecuteDrag( const StringList& rTypes, SalFrame* pDragFrame )
+{
+ int i;
+ Atom* pTypes = new Atom[rTypes.Count() ];
+
+#if defined DEBUG
+ fprintf( stderr, "DtIntegrator::ExecuteDrag: " );
+#endif
+ meDragState = DtDragging;
+
+ if( ! pDragFrame )
+ pDragFrame = maDropzones.GetObject( maDropzones.Count()-1 );
+ else
+ {
+ for( i = 0; i < maDropzones.Count(); i++ )
+ if( maDropzones.GetObject( i ) == pDragFrame )
+ break;
+ if( i >= maDropzones.Count() )
+ {
+#if defined DEBUG
+ fprintf( stderr, "DragFrame is no Dropzone !!! taking last dropzone as source instead ...\n" );
+#endif
+ pDragFrame = maDropzones.GetObject( maDropzones.Count()-1 );
+ }
+ }
+
+ maDragSource = pDragFrame->maFrameData.GetWindow();
+ // set up drag types
+ while( maDragTypes.Count() )
+ delete maDragTypes.Remove( (ULONG)0 );
+ for( i = 0; i < rTypes.Count(); i++ )
+ {
+ maDragTypes.Insert( new String( *rTypes.GetObject( i ) ), LIST_APPEND );
+ pTypes[ i ] = XInternAtom( mpDisplay,
+ ByteString( *rTypes.GetObject( i ), RTL_TEXTENCODING_ISO_8859_1 ).GetBuffer(),
+ False );
+#if defined DEBUG
+ fprintf( stderr, " \"%s\"",
+ ByteString( *rTypes.GetObject( i ), RTL_TEXTENCODING_ISO_8859_1 ).GetBuffer() );
+#endif
+ }
+#if defined DEBUG
+ fprintf( stderr, "\n" );
+#endif
+
+ // set the types in the property XdndTypeList
+ XChangeProperty( mpDisplay, maDragSource, mnXdndTypeList, XA_ATOM,
+ 32, PropModeReplace, (unsigned char*)pTypes,
+ rTypes.Count() );
+ delete pTypes;
+
+ XLIB_Cursor aCur = mpSalDisplay->GetPointer( POINTER_MOVEFILES );
+ XLIB_Window aRoot = DefaultRootWindow( mpDisplay );
+
+ // set cursor
+ XGrabPointer( mpDisplay, aRoot, False,
+ EVENTMASK_WHILE_DRAGGING,
+ GrabModeAsync, GrabModeAsync, None, aCur, CurrentTime );
+ XGrabKeyboard( mpDisplay, maDragSource, False, GrabModeAsync,
+ GrabModeAsync, CurrentTime );
+ XSetSelectionOwner( mpDisplay, mnXdndSelection,
+ maDragSource, CurrentTime );
+
+ while( meDragState != DtDragNone )
+ Application::Yield();
+
+ XSetSelectionOwner( mpDisplay, mnXdndSelection,
+ None, CurrentTime );
+ XUngrabKeyboard( mpDisplay, CurrentTime );
+ XUngrabPointer( mpDisplay, CurrentTime );
+
+ return DtDropCopy;
+}
+
+XLIB_Window DtIntegrator::GetXdndAwareWindowBeneathPointer( int& rVersion,
+ XEvent* pEvent)
+{
+ XLIB_Window aRoot = DefaultRootWindow( mpDisplay );
+ XLIB_Window aWindow = aRoot, aParent = aRoot;
+ int nXRoot, nYRoot, nX, nY;
+
+ if( pEvent->type == MotionNotify )
+ {
+ nX = pEvent->xmotion.x_root;
+ nY = pEvent->xmotion.y_root;
+ }
+ else if( pEvent->type == ButtonPress || pEvent->type == ButtonRelease )
+ {
+ nX = pEvent->xbutton.x_root;
+ nY = pEvent->xbutton.y_root;
+ }
+ else if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease )
+ {
+ nX = pEvent->xkey.x_root;
+ nY = pEvent->xkey.y_root;
+ }
+
+ rVersion = 0;
+ while( ! rVersion && aWindow != None )
+ {
+ XTranslateCoordinates( mpDisplay, aRoot, aParent,
+ nX, nY, &nXRoot, &nYRoot, &aWindow );
+ if( aWindow != None )
+ {
+ aParent = aWindow;
+
+ Atom aActualType;
+ int nActualFormat;
+ unsigned long nItems;
+ unsigned long nBytesAfter;
+ unsigned char *pData=0;
+ XGetWindowProperty( mpDisplay, aWindow,
+ mnXdndAware,
+ 0, 1, False, XA_ATOM,
+ &aActualType, &nActualFormat,
+ &nItems, &nBytesAfter, &pData );
+ if( pData &&
+ aActualType == XA_ATOM &&
+ nActualFormat == 32 &&
+ nItems == 1 )
+ {
+ rVersion = *((int*)pData );
+ }
+ if( pData )
+ XFree( pData );
+ }
+ }
+ if( ! rVersion )
+ return None;
+
+ return aWindow;
+}
+
+void DtIntegrator::SendXdndLeave()
+{
+ if( maDragTarget != None )
+ {
+ XEvent aEvent;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = mpDisplay;
+ aEvent.xclient.window = maDragTarget;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = mnXdndLeave;
+ aEvent.xclient.data.l[0] = maDragSource;
+ aEvent.xclient.data.l[1] = 0;
+ XSendEvent( mpDisplay, maDragTarget, False,
+ NoEventMask, &aEvent );
+#if defined DEBUG
+ fprintf( stderr, "Sending XdndLeave\n" );
+#endif
+ }
+}
+
+void DtIntegrator::SendXdndEnter()
+{
+ if( maDragTarget != None )
+ {
+ int i;
+ XEvent aEvent;
+
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = mpDisplay;
+ aEvent.xclient.window = maDragTarget;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = mnXdndEnter;
+ aEvent.xclient.data.l[0] = maDragSource;
+ aEvent.xclient.data.l[1] = maDragTypes.Count() > 3 ? 1 : 0;
+ aEvent.xclient.data.l[1] |= XDND_PROTOCOL_VERSION << 24;
+ aEvent.xclient.data.l[2] = None;
+ aEvent.xclient.data.l[3] = None;
+ aEvent.xclient.data.l[4] = None;
+ for( i = 0; i < maDragTypes.Count() && i < 3; i++ )
+ aEvent.xclient.data.l[i+2] =
+ XInternAtom( mpDisplay,
+ ByteString( *maDragTypes.GetObject( i ), RTL_TEXTENCODING_ISO_8859_1 ).GetBuffer(),
+ False );
+ XSendEvent( mpDisplay, maDragTarget, False,
+ NoEventMask, &aEvent );
+#if defined DEBUG
+ fprintf( stderr, "Sending XdndEnter\n" );
+#endif
+ }
+}
+
+void DtIntegrator::SendXdndPosition( XEvent* pEvent )
+{
+ static int nLastSendX = -1;
+ static int nLastSendY = -1;
+ static int nLastState = 0, nState = 0;
+
+ if( pEvent->type == ButtonPress || pEvent->type == ButtonRelease )
+ {
+ mnLastDragX = pEvent->xbutton.x_root;
+ mnLastDragY = pEvent->xbutton.y_root;
+ mnLastDragTimestamp = pEvent->xbutton.time;
+ nState = pEvent->xbutton.state;
+ }
+ else if( pEvent->type == MotionNotify )
+ {
+ mnLastDragX = pEvent->xmotion.x_root;
+ mnLastDragY = pEvent->xmotion.y_root;
+ mnLastDragTimestamp = pEvent->xmotion.time;
+ nState = pEvent->xmotion.state;
+ }
+ else if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease )
+ {
+ mnLastDragX = pEvent->xkey.x_root;
+ mnLastDragY = pEvent->xkey.y_root;
+ mnLastDragTimestamp = pEvent->xkey.time;
+ nState = pEvent->xkey.state;
+ }
+ if( maDragTarget != None &&
+ meDragState != DtWaitForStatus &&
+ meDragState != DtWaitForDataRequest &&
+ ( mnLastDragX != nLastSendX ||
+ mnLastDragY != nLastSendY ||
+ nState != nLastState )
+ )
+ {
+ nLastSendX = mnLastDragX;
+ nLastSendY = mnLastDragY;
+ nLastState = nState;
+
+ XEvent aEvent;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = mpDisplay;
+ aEvent.xclient.window = maDragTarget;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = mnXdndPosition;
+ aEvent.xclient.data.l[0] = maDragSource;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] =
+ ( mnLastDragX << 16 ) | ( mnLastDragY );
+ aEvent.xclient.data.l[3] = mnLastDragTimestamp;
+ // Insert correct DropAction here
+ if( nLastState & ( ShiftMask | ControlMask ) )
+ aEvent.xclient.data.l[4] = mnXdndActionLink;
+ else if( nLastState & ShiftMask )
+ aEvent.xclient.data.l[4] = mnXdndActionMove;
+ else if( nLastState & ControlMask )
+ aEvent.xclient.data.l[4] = mnXdndActionCopy;
+ else
+ aEvent.xclient.data.l[4] = mnXdndActionCopy;
+
+ XSendEvent( mpDisplay, maDragTarget, False,
+ NoEventMask, &aEvent );
+ meDragState = DtWaitForStatus;
+ mnWaitTimestamp = mnLastDragTimestamp;
+#if defined DEBUG
+ fprintf( stderr, "Sending XdndPosition\n" );
+#endif
+ }
+}
+
+void DtIntegrator::CheckXdndTimeout( int nTime )
+{
+ if( meDragState == DtWaitForDataRequest &&
+ ( nTime - mnWaitTimestamp > 5000 ||
+ mnWaitTimestamp > nTime ) )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Timeout on DtWaitForRequestData\n" );
+#endif
+ maDragTarget = None;
+ maDragSource = None;
+ meDragState = DtDragNone;
+ }
+ else if( meDragState == DtWaitForStatus &&
+ ( nTime - mnWaitTimestamp > 5000 ||
+ mnWaitTimestamp > nTime ) )
+ {
+#if defined DEBUG
+ fprintf( stderr, "Timeout on DtWaitForStatus\n" );
+#endif
+ meDragState = DtDragging;
+ }
+}
+
+BOOL DtIntegrator::GetSystemLook( SystemLookInfo& rInfo )
+{
+ return FALSE;
+}
diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk
new file mode 100644
index 000000000000..4fabb41d3d6a
--- /dev/null
+++ b/vcl/unx/source/gdi/makefile.mk
@@ -0,0 +1,124 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=vcl
+TARGET=salgdi
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(OS)"=="MACOSX"
+
+dummy:
+ @echo "Nothing to build for Mac OS X"
+
+.ELSE # "$(OS)"=="MACOSX"
+
+.IF "$(remote)"==""
+SLOFILES= \
+ $(SLO)$/salgdi2.obj \
+ $(SLO)$/salbmp.obj \
+ $(SLO)$/salgdi.obj \
+ $(SLO)$/salvd.obj \
+ $(SLO)$/salprn.obj \
+ $(SLO)$/salogl.obj \
+ $(SLO)$/salpimpl.obj \
+ $(SLO)$/charnames.obj \
+ $(SLO)$/dtint.obj \
+ $(SLO)$/cdeint.obj \
+ $(SLO)$/kdeint.obj \
+ $(SLO)$/salconfig.obj \
+ $(SLO)$/salcvt.obj \
+ $(SLO)$/ansi1252.obj \
+ $(SLO)$/xfont.obj \
+ $(SLO)$/xlfd_attr.obj \
+ $(SLO)$/xlfd_extd.obj \
+ $(SLO)$/xlfd_smpl.obj \
+ $(SLO)$/salgdi3.obj
+
+.ENDIF
+
+.ENDIF # "$(OS)"=="MACOSX"
+
+# --- Targets ------------------------------------------------------
+
+ALL: $(INCCOM)$/rtsname.hxx ALLTAR
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+XSALSETLIBNAME=libspa$(UPD)$(DLLPOSTFIX).so
+
+$(INCCOM)$/rtsname.hxx:
+ rm -f $(INCCOM)$/rtsname.hxx ; \
+ echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx
+
+salpimpl.cxx: $(INCCOM)$/rtsname.hxx
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
new file mode 100644
index 000000000000..bb0feb821a91
--- /dev/null
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -0,0 +1,885 @@
+/*************************************************************************
+ *
+ * $RCSfile: salbmp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALBMP_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/shm.h>
+#include <prex.h>
+#include <postx.h>
+#include <salunx.h>
+#ifndef _RTL_MEMORY_H_
+#include <rtl/memory.h>
+#endif
+#ifndef _SV_SALBTYPE_HXX
+#include <salbtype.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef _SV_SALBMP_HXX
+#include <salbmp.hxx>
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define SAL_DRAWPIXMAP_MAX_EXT 4096
+
+// -------------
+// - SalBitmap -
+// -------------
+
+ImplSalBitmapCache* SalBitmap::mpCache = NULL;
+ULONG SalBitmap::mnCacheInstCount = 0;
+
+// -----------------------------------------------------------------------------
+
+SalBitmap::SalBitmap() :
+ mpDIB( NULL ),
+ mpDDB( NULL )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+SalBitmap::~SalBitmap()
+{
+ Destroy();
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::ImplCreateCache()
+{
+ if( !mnCacheInstCount++ )
+ mpCache = new ImplSalBitmapCache;
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::ImplDestroyCache()
+{
+ DBG_ASSERT( mnCacheInstCount, "SalBitmap::ImplDestroyCache(): underflow" );
+
+ if( mnCacheInstCount && !--mnCacheInstCount )
+ delete mpCache, mpCache = NULL;
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::ImplRemovedFromCache()
+{
+ if( mpDDB )
+ delete mpDDB, mpDDB = NULL;
+}
+
+// -----------------------------------------------------------------------------
+
+BitmapBuffer* SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+{
+ DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 24, "Unsupported BitCount!" );
+
+ BitmapBuffer* pDIB;
+
+ if( rSize.Width() && rSize.Height() )
+ {
+ pDIB = new BitmapBuffer;
+
+ if( pDIB )
+ {
+ const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0;
+
+ pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP;
+
+ switch( nBitCount )
+ {
+ case( 1 ): pDIB->mnFormat |= BMP_FORMAT_1BIT_MSB_PAL; break;
+ case( 4 ): pDIB->mnFormat |= BMP_FORMAT_4BIT_MSN_PAL; break;
+ case( 8 ): pDIB->mnFormat |= BMP_FORMAT_8BIT_PAL; break;
+
+ default:
+ pDIB->mnFormat |= BMP_FORMAT_24BIT_TC_BGR;
+ break;
+ }
+
+ pDIB->mnWidth = rSize.Width();
+ pDIB->mnHeight = rSize.Height();
+ pDIB->mnScanlineSize = AlignedWidth4Bytes( pDIB->mnWidth * nBitCount );
+ pDIB->mnBitCount = nBitCount;
+
+ if( nColors )
+ {
+ pDIB->maPalette = rPal;
+ pDIB->maPalette.SetEntryCount( nColors );
+ }
+
+ pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ];
+ rtl_zeroMemory( pDIB->mpBits, pDIB->mnScanlineSize * pDIB->mnHeight );
+ }
+ }
+ else
+ pDIB = NULL;
+
+ return pDIB;
+}
+
+// -----------------------------------------------------------------------------
+
+BitmapBuffer* SalBitmap::ImplCreateDIB( Drawable aDrawable,
+ long nDrawableDepth,
+ long nX, long nY,
+ long nWidth, long nHeight )
+{
+ BitmapBuffer* pDIB = NULL;
+
+ if( aDrawable && nWidth && nHeight && nDrawableDepth )
+ {
+ SalDisplay* pSalDisp = GetSalData()->GetCurDisp();
+ SalXLib* pXLib = pSalDisp->GetXLib();
+ Display* pXDisp = pSalDisp->GetDisplay();
+
+ // do not die on XError here
+ // alternatively one could check the coordinates for being offscreen
+ // but this call can actually work on servers with backing store
+ // defaults even if the rectangle is offscreen
+ // so better catch the XError
+ BOOL bXError = pXLib->GetIgnoreXErrors();
+ pXLib->SetIgnoreXErrors( TRUE );
+ XImage* pImage = XGetImage( pXDisp, aDrawable, nX, nY, nWidth, nHeight, AllPlanes, ZPixmap );
+ BOOL bWasError = pXLib->WasXError();
+ pXLib->SetIgnoreXErrors( bXError );
+
+ if( ! bWasError && pImage && pImage->data )
+ {
+ const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
+ BitmapBuffer aSrcBuf;
+ ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP;
+ const BitmapPalette* pDstPal = NULL;
+
+ aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
+ aSrcBuf.mnWidth = nWidth;
+ aSrcBuf.mnHeight = nHeight;
+ aSrcBuf.mnBitCount = pImage->bits_per_pixel;
+ aSrcBuf.mnScanlineSize = pImage->bytes_per_line;
+ aSrcBuf.mpBits = (BYTE*) pImage->data;
+
+ pImage->red_mask = pSalDisp->GetVisual()->red_mask;
+ pImage->green_mask = pSalDisp->GetVisual()->green_mask;
+ pImage->blue_mask = pSalDisp->GetVisual()->blue_mask;
+
+ switch( aSrcBuf.mnBitCount )
+ {
+ case( 1 ):
+ {
+ aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL );
+ nDstFormat |= BMP_FORMAT_1BIT_MSB_PAL;
+ }
+ break;
+
+ case( 4 ):
+ {
+ aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL );
+ nDstFormat |= BMP_FORMAT_4BIT_MSN_PAL;
+ }
+ break;
+
+ case( 8 ):
+ {
+ aSrcBuf.mnFormat |= BMP_FORMAT_8BIT_PAL;
+ nDstFormat |= BMP_FORMAT_8BIT_PAL;
+ }
+ break;
+
+ case( 16 ):
+ {
+ aSrcBuf.mnFormat |= BMP_FORMAT_16BIT_TC_MASK;
+ nDstFormat |= BMP_FORMAT_24BIT_TC_BGR;
+
+ if( LSBFirst == pImage->byte_order )
+ aSrcBuf.maColorMask = ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask );
+ else
+ aSrcBuf.maColorMask = ColorMask( SWAPSHORT( pImage->red_mask ), SWAPSHORT( pImage->green_mask ), SWAPSHORT( pImage->blue_mask ) );
+ }
+ break;
+
+ case( 24 ):
+ {
+ if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) )
+ aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_RGB;
+ else
+ aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_BGR;
+
+ nDstFormat |= BMP_FORMAT_24BIT_TC_BGR;
+ }
+ break;
+
+ case( 32 ):
+ {
+ if( LSBFirst == pImage->byte_order )
+ aSrcBuf.mnFormat |= ( pSalDisp->GetVisual()->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA );
+ else
+ aSrcBuf.mnFormat |= ( pSalDisp->GetVisual()->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB );
+
+ nDstFormat |= BMP_FORMAT_24BIT_TC_BGR;
+ }
+ break;
+ }
+
+ BitmapPalette& rPal = aSrcBuf.maPalette;
+
+ if( aSrcBuf.mnBitCount == 1 )
+ {
+ rPal.SetEntryCount( 2 );
+ pDstPal = &rPal;
+
+ rPal[ 0 ] = Color( COL_BLACK );
+ rPal[ 1 ] = Color( COL_WHITE );
+ }
+ else if( aSrcBuf.mnBitCount <= 8 )
+ {
+ SalColormap& rColMap = pSalDisp->GetColormap();
+ const USHORT nCols = Min( (USHORT)rColMap.GetUsed(), 1 << nDrawableDepth );
+
+ rPal.SetEntryCount( nCols );
+ pDstPal = &rPal;
+
+ for( USHORT i = 0; i < nCols; i++ )
+ {
+ const SalColor nColor( rColMap.GetColor( i ) );
+ BitmapColor& rBmpCol = rPal[ i ];
+
+ rBmpCol.SetRed( SALCOLOR_RED( nColor ) );
+ rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) );
+ rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) );
+ }
+ }
+
+ pDIB = StretchAndConvert( aSrcBuf, aTwoRect, nDstFormat, const_cast<BitmapPalette*>(pDstPal) );
+ XDestroyImage( pImage );
+ }
+ }
+
+ return pDIB;
+}
+
+// -----------------------------------------------------------------------------
+
+XImage* SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, long nDepth, const SalTwoRect& rTwoRect ) const
+{
+ XImage* pImage = NULL;
+
+ if( !mpDIB && mpDDB )
+ {
+ ( (SalBitmap*) this )->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(),
+ mpDDB->ImplGetDepth(),
+ 0, 0,
+ mpDDB->ImplGetWidth(),
+ mpDDB->ImplGetHeight() );
+ }
+
+ if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight )
+ {
+ Display* pXDisp = pSalDisp->GetDisplay();
+ long nWidth = rTwoRect.mnDestWidth;
+ long nHeight = rTwoRect.mnDestHeight;
+
+ if( 1 == GetBitCount() )
+ nDepth = 1;
+
+ pImage = XCreateImage( pXDisp, pSalDisp->GetVisual()->GetVisual(),
+ nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, NULL,
+ nWidth, nHeight, 32, 0 );
+
+ if( pImage )
+ {
+ BitmapBuffer* pDstBuf;
+ ULONG nDstFormat = BMP_FORMAT_TOP_DOWN;
+ BitmapPalette* pPal = NULL;
+ ColorMask* pMask = NULL;
+
+ switch( pImage->bits_per_pixel )
+ {
+ case( 1 ):
+ nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL );
+ break;
+
+ case( 4 ):
+ nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL );
+ break;
+
+ case( 8 ):
+ nDstFormat |= BMP_FORMAT_8BIT_PAL;
+ break;
+
+ case( 16 ):
+ {
+ nDstFormat |= BMP_FORMAT_16BIT_TC_MASK;
+
+ if( LSBFirst == pImage->byte_order )
+ pMask = new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask );
+ else
+ pMask = new ColorMask( SWAPSHORT( pImage->red_mask ), SWAPSHORT( pImage->green_mask ), SWAPSHORT( pImage->blue_mask ) );
+ }
+ break;
+
+ case( 24 ):
+ {
+ if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) )
+ nDstFormat |= BMP_FORMAT_24BIT_TC_RGB;
+ else
+ nDstFormat |= BMP_FORMAT_24BIT_TC_BGR;
+ }
+ break;
+
+ case( 32 ):
+ {
+ if( LSBFirst == pImage->byte_order )
+ nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA );
+ else
+ nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB );
+ }
+ break;
+ }
+
+ if( pImage->depth == 1 )
+ {
+ pPal = new BitmapPalette( 2 );
+ (*pPal)[ 0 ] = Color( COL_BLACK );
+ (*pPal)[ 1 ] = Color( COL_WHITE );
+ }
+ else if( pImage->depth <= 8 )
+ {
+ SalColormap& rColMap = pSalDisp->GetColormap();
+ const USHORT nCols = Min( (USHORT)rColMap.GetUsed(), 1 << pImage->depth );
+
+ pPal = new BitmapPalette( nCols );
+
+ for( USHORT i = 0; i < nCols; i++ )
+ {
+ const SalColor nColor( rColMap.GetColor( i ) );
+ BitmapColor& rBmpCol = (*pPal)[ i ];
+
+ rBmpCol.SetRed( SALCOLOR_RED( nColor ) );
+ rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) );
+ rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) );
+ }
+ }
+
+ pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, pPal, pMask );
+ delete pPal;
+ delete pMask;
+
+ if( pDstBuf && pDstBuf->mpBits )
+ {
+ // set data in buffer as data member in pImage
+ pImage->data = (char*) pDstBuf->mpBits;
+
+ // destroy buffer; don't destroy allocated data in buffer
+ delete pDstBuf;
+ }
+ else
+ {
+ XDestroyImage( pImage );
+ pImage = NULL;
+ }
+ }
+ }
+
+ return pImage;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, long nDrawableDepth,
+ long nX, long nY, long nWidth, long nHeight )
+{
+ Destroy();
+
+ if( aDrawable && nWidth && nHeight && nDrawableDepth )
+ mpDDB = new ImplSalDDB( aDrawable, nDrawableDepth, nX, nY, nWidth, nHeight );
+
+ return( mpDDB != NULL );
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::ImplDraw( Drawable aDrawable, long nDrawableDepth,
+ const SalTwoRect& rTwoRect, const GC& rGC ) const
+{
+ if( !mpDDB || !mpDDB->ImplMatches( nDrawableDepth, rTwoRect ) )
+ {
+ if( mpDDB )
+ {
+ // do we already have a DIB? if not, create aDIB from current DDB first
+ if( !mpDIB )
+ {
+ ( (SalBitmap*) this )->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(),
+ mpDDB->ImplGetDepth(),
+ 0, 0,
+ mpDDB->ImplGetWidth(),
+ mpDDB->ImplGetHeight() );
+ }
+
+ delete mpDDB, ( (SalBitmap*) this )->mpDDB = NULL;
+ }
+
+ if( mpCache )
+ mpCache->ImplRemove( const_cast<SalBitmap*>(this) );
+
+ SalTwoRect aTwoRect( rTwoRect );
+
+ // create new DDB from DIB
+ if( aTwoRect.mnSrcWidth == aTwoRect.mnDestWidth &&
+ aTwoRect.mnSrcHeight == aTwoRect.mnDestHeight )
+ {
+ const Size aSize( GetSize() );
+
+ aTwoRect.mnSrcX = aTwoRect.mnSrcY = aTwoRect.mnDestX = aTwoRect.mnDestY = 0;
+ aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = aSize.Width();
+ aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height();
+ }
+
+ XImage* pImage = ImplCreateXImage( GetSalData()->GetCurDisp(),
+ nDrawableDepth, aTwoRect );
+
+ if( pImage )
+ {
+ ( (SalBitmap*) this )->mpDDB = new ImplSalDDB( pImage, aDrawable, aTwoRect );
+ delete[] pImage->data, pImage->data = NULL;
+ XDestroyImage( pImage );
+
+ if( mpCache )
+ mpCache->ImplAdd( const_cast<SalBitmap*>(this), mpDDB->ImplGetMemSize() );
+ }
+ }
+
+ if( mpDDB )
+ mpDDB->ImplDraw( aDrawable, nDrawableDepth, rTwoRect, rGC );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+{
+ Destroy();
+ mpDIB = ImplCreateDIB( rSize, nBitCount, rPal );
+
+ return( mpDIB != NULL );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL SalBitmap::Create( const SalBitmap& rSalBmp )
+{
+ Destroy();
+
+ if( rSalBmp.mpDIB )
+ {
+ const Size aSize( rSalBmp.GetSize() );
+
+ mpDIB = ImplCreateDIB( rSalBmp.GetSize(), rSalBmp.GetBitCount(), rSalBmp.mpDIB->maPalette );
+
+ if( mpDIB )
+ memcpy( mpDIB->mpBits, rSalBmp.mpDIB->mpBits, mpDIB->mnScanlineSize * mpDIB->mnHeight );
+ }
+ else
+ {
+ DBG_ASSERT( !rSalBmp.mpDDB, "trying to copy construct SalBitmap with DDB => NYI" );
+ }
+
+ return( !rSalBmp.mpDIB || ( mpDIB != NULL ) );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL SalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics )
+{
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL SalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount )
+{
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::Destroy()
+{
+ if( mpDIB )
+ {
+ delete[] mpDIB->mpBits;
+ delete mpDIB, mpDIB = NULL;
+ }
+
+ if( mpDDB )
+ delete mpDDB, mpDDB = NULL;
+
+ if( mpCache )
+ mpCache->ImplRemove( this );
+}
+
+// -----------------------------------------------------------------------------
+
+Size SalBitmap::GetSize() const
+{
+ Size aSize;
+
+ if( mpDIB )
+ aSize.Width() = mpDIB->mnWidth, aSize.Height() = mpDIB->mnHeight;
+ else if( mpDDB )
+ aSize.Width() = mpDDB->ImplGetWidth(), aSize.Height() = mpDDB->ImplGetHeight();
+
+ return aSize;
+}
+
+// -----------------------------------------------------------------------------
+
+USHORT SalBitmap::GetBitCount() const
+{
+ USHORT nBitCount;
+
+ if( mpDIB )
+ nBitCount = mpDIB->mnBitCount;
+ else if( mpDDB )
+ {
+ nBitCount = mpDDB->ImplGetDepth();
+
+ if( nBitCount && nBitCount > 1 )
+ {
+ if( nBitCount <= 4 )
+ nBitCount = 4;
+ else if( nBitCount <= 8 )
+ nBitCount = 8;
+ else
+ nBitCount = 24;
+ }
+ }
+ else
+ nBitCount = 0;
+
+ return nBitCount;
+}
+
+// -----------------------------------------------------------------------------
+
+BitmapBuffer* SalBitmap::AcquireBuffer( BOOL bReadOnly )
+{
+ if( !mpDIB && mpDDB )
+ {
+ mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), mpDDB->ImplGetDepth(),
+ 0, 0, mpDDB->ImplGetWidth(), mpDDB->ImplGetHeight() );
+ }
+
+ return mpDIB;
+}
+
+// -----------------------------------------------------------------------------
+
+void SalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly )
+{
+ if( !bReadOnly )
+ {
+ if( mpDDB )
+ delete mpDDB, mpDDB = NULL;
+
+ if( mpCache )
+ mpCache->ImplRemove( this );
+ }
+}
+
+// --------------
+// - ImplSalDDB -
+// --------------
+
+ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, const SalTwoRect& rTwoRect ) :
+ maPixmap ( 0 ),
+ maTwoRect ( rTwoRect ),
+ mnDepth ( pImage->depth )
+{
+ SalDisplay* pSalDisp = GetSalData()->GetCurDisp();
+ Display* pXDisp = pSalDisp->GetDisplay();
+
+ if( maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() ) )
+ {
+ XGCValues aValues;
+ GC aGC;
+ int nValues = GCFunction;
+
+ aValues.function = GXcopy;
+
+ if( 1 == mnDepth )
+ {
+ nValues |= ( GCForeground | GCBackground );
+ aValues.foreground = 1, aValues.background = 0;
+ }
+
+ aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues );
+ XPutImage( pXDisp, maPixmap, aGC, pImage, 0, 0, 0, 0, maTwoRect.mnDestWidth, maTwoRect.mnDestHeight );
+ XFreeGC( pXDisp, aGC );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+ImplSalDDB::ImplSalDDB( Drawable aDrawable, long nDrawableDepth, long nX, long nY, long nWidth, long nHeight ) :
+ mnDepth( nDrawableDepth )
+{
+ SalDisplay* pSalDisp = GetSalData()->GetCurDisp();
+ Display* pXDisp = pSalDisp->GetDisplay();
+
+ if( maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth ) )
+ {
+ XGCValues aValues;
+ GC aGC;
+ int nValues = GCFunction;
+
+ aValues.function = GXcopy;
+
+ if( 1 == mnDepth )
+ {
+ nValues |= ( GCForeground | GCBackground );
+ aValues.foreground = 1, aValues.background = 0;
+ }
+
+ aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues );
+ ImplDraw( aDrawable, nDrawableDepth, maPixmap, mnDepth,
+ nX, nY, nWidth, nHeight, 0, 0, aGC );
+ XFreeGC( pXDisp, aGC );
+
+ maTwoRect.mnSrcX = maTwoRect.mnSrcY = maTwoRect.mnDestX = maTwoRect.mnDestY = 0;
+ maTwoRect.mnSrcWidth = maTwoRect.mnDestWidth = nWidth;
+ maTwoRect.mnSrcHeight = maTwoRect.mnDestHeight = nHeight;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+ImplSalDDB::~ImplSalDDB()
+{
+ if( maPixmap && ImplGetSVData() )
+ XFreePixmap( GetSalData()->GetCurDisp()->GetDisplay(), maPixmap );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL ImplSalDDB::ImplMatches( long nDepth, const SalTwoRect& rTwoRect ) const
+{
+ BOOL bRet = FALSE;
+
+ if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) )
+ {
+ if( rTwoRect.mnSrcX == maTwoRect.mnSrcX && rTwoRect.mnSrcY == maTwoRect.mnSrcY &&
+ rTwoRect.mnSrcWidth == maTwoRect.mnSrcWidth && rTwoRect.mnSrcHeight == maTwoRect.mnSrcHeight &&
+ rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight )
+ {
+ // absolutely indentically
+ bRet = TRUE;
+ }
+ else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight &&
+ maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight &&
+ rTwoRect.mnSrcX >= maTwoRect.mnSrcX && rTwoRect.mnSrcY >= maTwoRect.mnSrcY &&
+ ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) &&
+ ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) )
+ {
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplSalDDB::ImplDraw( Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const
+{
+ ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth,
+ rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY,
+ rTwoRect.mnDestWidth, rTwoRect.mnDestHeight,
+ rTwoRect.mnDestX, rTwoRect.mnDestY, rGC );
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
+ Drawable aDstDrawable, long nDstDrawableDepth,
+ long nSrcX, long nSrcY,
+ long nDestWidth, long nDestHeight,
+ long nDestX, long nDestY, const GC& rGC )
+{
+ SalDisplay* pSalDisp = GetSalData()->GetCurDisp();
+ Display* pXDisp = pSalDisp->GetDisplay();
+
+ if( 1 == nSrcDrawableDepth )
+ {
+ XCopyPlane( pXDisp, aSrcDrawable, aDstDrawable, rGC,
+ nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY, 1 );
+ }
+ else
+ {
+ if( nDestWidth > SAL_DRAWPIXMAP_MAX_EXT )
+ {
+ // !!! Broken XCopyArea
+ XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC,
+ nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY );
+ }
+ else
+ {
+ XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC,
+ nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY );
+ }
+ }
+}
+
+// ----------------------
+// - ImplSalBitmapCache -
+// ----------------------
+
+struct ImplBmpObj
+{
+ SalBitmap* mpBmp;
+ ULONG mnMemSize;
+ ULONG mnFlags;
+
+ ImplBmpObj( SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) :
+ mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {}
+};
+
+// -----------------------------------------------------------------------------
+
+ImplSalBitmapCache::ImplSalBitmapCache() :
+ mnTotalSize( 0UL )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+ImplSalBitmapCache::~ImplSalBitmapCache()
+{
+ ImplClear();
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplSalBitmapCache::ImplAdd( SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags )
+{
+ ImplBmpObj* pObj;
+ BOOL bFound = FALSE;
+
+ for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() )
+ if( pObj->mpBmp == pBmp )
+ bFound = TRUE;
+
+ mnTotalSize += nMemSize;
+
+ if( bFound )
+ {
+ mnTotalSize -= pObj->mnMemSize;
+ pObj->mnMemSize = nMemSize, pObj->mnFlags = nFlags;
+ }
+ else
+ maBmpList.Insert( new ImplBmpObj( pBmp, nMemSize, nFlags ), LIST_APPEND );
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplSalBitmapCache::ImplRemove( SalBitmap* pBmp )
+{
+ for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.Last(); pObj; pObj = (ImplBmpObj*) maBmpList.Prev() )
+ {
+ if( pObj->mpBmp == pBmp )
+ {
+ maBmpList.Remove( pObj );
+ pObj->mpBmp->ImplRemovedFromCache();
+ mnTotalSize -= pObj->mnMemSize;
+ delete pObj;
+ break;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplSalBitmapCache::ImplClear()
+{
+ for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.First(); pObj; pObj = (ImplBmpObj*) maBmpList.Next() )
+ {
+ pObj->mpBmp->ImplRemovedFromCache();
+ delete pObj;
+ }
+
+ maBmpList.Clear();
+ mnTotalSize = 0;
+}
diff --git a/vcl/unx/source/gdi/salcvt.cxx b/vcl/unx/source/gdi/salcvt.cxx
new file mode 100644
index 000000000000..49359471a25f
--- /dev/null
+++ b/vcl/unx/source/gdi/salcvt.cxx
@@ -0,0 +1,434 @@
+/*************************************************************************
+ *
+ * $RCSfile: salcvt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef SAL_CONVERTER_CACHE_HXX_
+#include "salcvt.hxx"
+#endif
+
+
+SalConverterCache::SalConverterCache()
+{
+ mpConverter = (ConverterT*)calloc( sizeof(ConverterT), RTL_TEXTENCODING_STD_COUNT );
+}
+
+SalConverterCache::~SalConverterCache()
+{
+ for ( int i = 0; i < RTL_TEXTENCODING_STD_COUNT; i++ )
+ {
+ if ( mpConverter[i].mpU2T != NULL )
+ rtl_destroyUnicodeToTextConverter( mpConverter[i].mpU2T );
+ if ( mpConverter[i].mpT2U != NULL )
+ rtl_destroyTextToUnicodeConverter( mpConverter[i].mpT2U );
+ }
+ free( mpConverter );
+}
+
+// ---> FIXME
+#include <stdio.h>
+// <---
+
+rtl_UnicodeToTextConverter
+SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding )
+{
+ if ( nEncoding < RTL_TEXTENCODING_STD_COUNT )
+ {
+ if ( mpConverter[ nEncoding ].mpU2T == NULL )
+ {
+ mpConverter[ nEncoding ].mpU2T =
+ rtl_createUnicodeToTextConverter( nEncoding );
+// ---> FIXME
+if ( mpConverter[ nEncoding ].mpU2T == NULL )
+ fprintf( stderr, "failed to create Unicode -> %s converter\n",
+ pGetEncodingName(nEncoding) );
+// <---
+ }
+ return mpConverter[ nEncoding ].mpU2T;
+ }
+ return NULL;
+}
+
+rtl_TextToUnicodeConverter
+SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding )
+{
+ if ( nEncoding < RTL_TEXTENCODING_STD_COUNT )
+ {
+ if ( mpConverter[ nEncoding ].mpT2U == NULL )
+ {
+ mpConverter[ nEncoding ].mpT2U =
+ rtl_createTextToUnicodeConverter( nEncoding );
+// ---> FIXME
+if ( mpConverter[ nEncoding ].mpT2U == NULL )
+ fprintf( stderr, "failed to create %s -> Unicode converter\n",
+ pGetEncodingName(nEncoding) );
+// <---
+ }
+ return mpConverter[ nEncoding ].mpT2U;
+ }
+ return NULL;
+}
+
+Bool
+SalConverterCache::IsSingleByteEncoding( rtl_TextEncoding nEncoding )
+{
+ if ( nEncoding < RTL_TEXTENCODING_STD_COUNT )
+ {
+ if ( ! mpConverter[ nEncoding ].mbValid )
+ {
+ mpConverter[ nEncoding ].mbValid = True;
+
+ rtl_TextEncodingInfo aTextEncInfo;
+ aTextEncInfo.StructSize = sizeof( aTextEncInfo );
+ rtl_getTextEncodingInfo( nEncoding, &aTextEncInfo );
+
+ if ( aTextEncInfo.MinimumCharSize == aTextEncInfo.MaximumCharSize
+ && aTextEncInfo.MinimumCharSize == 1)
+ mpConverter[ nEncoding ].mbSingleByteEncoding = True;
+ else
+ mpConverter[ nEncoding ].mbSingleByteEncoding = False;
+ }
+
+ return mpConverter[ nEncoding ].mbSingleByteEncoding;
+ }
+ return False;
+}
+
+// check whether the character set nEncoding contains the unicode
+// code point nChar. This list has been compiled from the according
+// ttmap files in /usr/openwin/lib/X11/fonts/TrueType/ttmap/
+Bool
+SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
+ sal_Unicode nChar )
+{
+ Bool bMatch = False;
+
+ switch ( nEncoding )
+ {
+ case RTL_TEXTENCODING_DONTKNOW:
+ bMatch = False;
+ break;
+
+ case RTL_TEXTENCODING_MS_1252:
+ case RTL_TEXTENCODING_ISO_8859_1:
+ bMatch = ( nChar >= 0x0000 && nChar <= 0x00ff );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_2:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ || ( nChar >= 0x02c7 && nChar <= 0x02dd );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_4:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ || ( nChar >= 0x02c7 && nChar <= 0x02db );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_5:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00ad )
+ || ( nChar >= 0x0401 && nChar <= 0x045f )
+ || ( nChar == 0x2116 );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_6:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x0600 && nChar <= 0x06ff )
+ || ( nChar >= 0xfb50 && nChar <= 0xfffe );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_7:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00bd )
+ || ( nChar == 0x02bd )
+ || ( nChar >= 0x0384 && nChar <= 0x03ce )
+ || ( nChar >= 0x2014 && nChar <= 0x2019 );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_8:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00f7 )
+ || ( nChar >= 0x05d0 && nChar <= 0x05ea )
+ || ( nChar == 0x2017 );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_9:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x015f );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_13:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ || ( nChar >= 0x2019 && nChar <= 0x201e );
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_15:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00ff )
+ || ( nChar >= 0x0152 && nChar <= 0x017e )
+ || ( nChar >= 0x20ac && nChar <= 0x20ac );
+ break;
+
+ case RTL_TEXTENCODING_JIS_X_0201:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0xff61 && nChar <= 0xff9f );
+ break;
+
+ case RTL_TEXTENCODING_MS_1251:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00bb )
+ || ( nChar >= 0x0401 && nChar <= 0x045f )
+ || ( nChar >= 0x0490 && nChar <= 0x0491 )
+ || ( nChar >= 0x2013 && nChar <= 0x203a )
+ || ( nChar >= 0x2116 && nChar <= 0x2122 )
+ || ( nChar == 0xfffe );
+ break;
+
+ case RTL_TEXTENCODING_KOI8_R:
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00b7 )
+ || ( nChar == 0x00f7 )
+ || ( nChar >= 0x0401 && nChar <= 0x0451 )
+ || ( nChar >= 0x2219 && nChar <= 0x221a )
+ || ( nChar >= 0x2248 && nChar <= 0x2265 )
+ || ( nChar >= 0x2320 && nChar <= 0x2321 )
+ || ( nChar >= 0x2500 && nChar <= 0x25a0 );
+ break;
+
+ case RTL_TEXTENCODING_UNICODE:
+ bMatch = True;
+ break;
+
+ default:
+ // XXX really convert the unicode char into the encoding
+ // and check for conversion errors, this is expensive !
+ rtl_UnicodeToTextConverter aConverter;
+ rtl_UnicodeToTextContext aContext;
+
+ aConverter = GetU2TConverter(nEncoding);
+ aContext = rtl_createUnicodeToTextContext( aConverter );
+
+ // ---> FIXME
+ if ( aConverter == NULL )
+ return False;
+ // <---
+
+ sal_Char pConversionBuffer[ 32 ];
+ sal_uInt32 nConversionInfo;
+ sal_Size nConvertedChars;
+ sal_uInt32 nCodePoint;
+ sal_Size nSize;
+
+ nSize = rtl_convertUnicodeToText( aConverter, aContext,
+ &nChar, 1, pConversionBuffer, sizeof(pConversionBuffer),
+ RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+ | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR,
+ &nConversionInfo, &nConvertedChars );
+
+ rtl_destroyUnicodeToTextContext( aConverter, aContext );
+
+ bMatch = (nConvertedChars == 1)
+ && (nSize == 1 || nSize == 2) // XXX Fix me this is a hack
+ && ((nConversionInfo & RTL_UNICODETOTEXT_INFO_ERROR) == 0);
+ break;
+ }
+
+ return bMatch;
+}
+
+// wrapper for rtl_convertUnicodeToText that handles the usual cases for
+// textconversion in drawtext and gettextwidth routines
+sal_Size
+ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
+ sal_Char *pBuffer, sal_Size nBufferSize,
+ rtl_UnicodeToTextConverter aConverter )
+{
+ const sal_uInt32 nCvtFlags =
+ RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK
+ | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ;
+ sal_uInt32 nCvtInfo;
+ sal_Size nCvtChars;
+
+ rtl_UnicodeToTextContext aContext =
+ rtl_createUnicodeToTextContext( aConverter );
+
+ sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext,
+ pText, nTextLen, pBuffer, nBufferSize,
+ nCvtFlags, &nCvtInfo, &nCvtChars );
+
+ rtl_destroyUnicodeToTextContext( aConverter, aContext );
+
+ return nSize;
+}
+
+typedef struct {
+ const rtl_TextEncoding nEncoding;
+ const char* pEncoding;
+} DescriptionT;
+
+const DescriptionT pRTLEncoding[] = {
+ { RTL_TEXTENCODING_DONTKNOW, "DONTKNOW" },
+ { RTL_TEXTENCODING_MS_1252, "MS_1252" },
+ { RTL_TEXTENCODING_APPLE_ROMAN, "APPLE_ROMAN" },
+ { RTL_TEXTENCODING_IBM_437, "IBM_437" },
+ { RTL_TEXTENCODING_IBM_850, "IBM_850" },
+ { RTL_TEXTENCODING_IBM_860, "IBM_860" },
+ { RTL_TEXTENCODING_IBM_861, "IBM_861" },
+ { RTL_TEXTENCODING_IBM_863, "IBM_863" },
+ { RTL_TEXTENCODING_IBM_865, "IBM_865" },
+ { RTL_TEXTENCODING_SYMBOL, "SYMBOL" },
+ { RTL_TEXTENCODING_ASCII_US, "ASCII_US" },
+ { RTL_TEXTENCODING_ISO_8859_1, "ISO_8859_1" },
+ { RTL_TEXTENCODING_ISO_8859_2, "ISO_8859_2" },
+ { RTL_TEXTENCODING_ISO_8859_3, "ISO_8859_3" },
+ { RTL_TEXTENCODING_ISO_8859_4, "ISO_8859_4" },
+ { RTL_TEXTENCODING_ISO_8859_5, "ISO_8859_5" },
+ { RTL_TEXTENCODING_ISO_8859_6, "ISO_8859_6" },
+ { RTL_TEXTENCODING_ISO_8859_7, "ISO_8859_7" },
+ { RTL_TEXTENCODING_ISO_8859_8, "ISO_8859_8" },
+ { RTL_TEXTENCODING_ISO_8859_9, "ISO_8859_9" },
+ { RTL_TEXTENCODING_ISO_8859_14, "ISO_8859_14" },
+ { RTL_TEXTENCODING_ISO_8859_15, "ISO_8859_15" },
+ { RTL_TEXTENCODING_IBM_737, "IBM_737" },
+ { RTL_TEXTENCODING_IBM_775, "IBM_775" },
+ { RTL_TEXTENCODING_IBM_852, "IBM_852" },
+ { RTL_TEXTENCODING_IBM_855, "IBM_855" },
+ { RTL_TEXTENCODING_IBM_857, "IBM_857" },
+ { RTL_TEXTENCODING_IBM_862, "IBM_862" },
+ { RTL_TEXTENCODING_IBM_864, "IBM_864" },
+ { RTL_TEXTENCODING_IBM_866, "IBM_866" },
+ { RTL_TEXTENCODING_IBM_869, "IBM_869" },
+ { RTL_TEXTENCODING_MS_874, "MS_874" },
+ { RTL_TEXTENCODING_MS_1250, "MS_1250" },
+ { RTL_TEXTENCODING_MS_1251, "MS_1251" },
+ { RTL_TEXTENCODING_MS_1253, "MS_1253" },
+ { RTL_TEXTENCODING_MS_1254, "MS_1254" },
+ { RTL_TEXTENCODING_MS_1255, "MS_1255" },
+ { RTL_TEXTENCODING_MS_1256, "MS_1256" },
+ { RTL_TEXTENCODING_MS_1257, "MS_1257" },
+ { RTL_TEXTENCODING_MS_1258, "MS_1258" },
+ { RTL_TEXTENCODING_APPLE_ARABIC, "APPLE_ARABIC" },
+ { RTL_TEXTENCODING_APPLE_CENTEURO, "APPLE_CENTEURO" },
+ { RTL_TEXTENCODING_APPLE_CROATIAN, "APPLE_CROATIAN" },
+ { RTL_TEXTENCODING_APPLE_CYRILLIC, "APPLE_CYRILLIC" },
+ { RTL_TEXTENCODING_APPLE_DEVANAGARI,"APPLE_DEVANAGARI" },
+ { RTL_TEXTENCODING_APPLE_FARSI, "APPLE_FARSI" },
+ { RTL_TEXTENCODING_APPLE_GREEK, "APPLE_GREEK" },
+ { RTL_TEXTENCODING_APPLE_GUJARATI, "APPLE_GUJARATI" },
+ { RTL_TEXTENCODING_APPLE_GURMUKHI, "APPLE_GURMUKHI" },
+ { RTL_TEXTENCODING_APPLE_HEBREW, "APPLE_HEBREW" },
+ { RTL_TEXTENCODING_APPLE_ICELAND, "APPLE_ICELAND" },
+ { RTL_TEXTENCODING_APPLE_ROMANIAN, "APPLE_ROMANIAN" },
+ { RTL_TEXTENCODING_APPLE_THAI, "APPLE_THAI" },
+ { RTL_TEXTENCODING_APPLE_TURKISH, "APPLE_TURKISH" },
+ { RTL_TEXTENCODING_APPLE_UKRAINIAN, "APPLE_UKRAINIAN" },
+ { RTL_TEXTENCODING_APPLE_CHINSIMP, "APPLE_CHINSIMP" },
+ { RTL_TEXTENCODING_APPLE_CHINTRAD, "APPLE_CHINTRAD" },
+ { RTL_TEXTENCODING_APPLE_JAPANESE, "APPLE_JAPANESE" },
+ { RTL_TEXTENCODING_APPLE_KOREAN, "APPLE_KOREAN" },
+ { RTL_TEXTENCODING_MS_932, "MS_932" },
+ { RTL_TEXTENCODING_MS_936, "MS_936" },
+ { RTL_TEXTENCODING_MS_949, "MS_949" },
+ { RTL_TEXTENCODING_MS_950, "MS_950" },
+ { RTL_TEXTENCODING_SHIFT_JIS, "SHIFT_JIS" },
+ { RTL_TEXTENCODING_GB_2312, "GB_2312" },
+ { RTL_TEXTENCODING_GBT_12345, "GBT_12345" },
+ { RTL_TEXTENCODING_GBK, "GBK" },
+ { RTL_TEXTENCODING_BIG5, "BIG5" },
+ { RTL_TEXTENCODING_EUC_JP, "EUC_JP" },
+ { RTL_TEXTENCODING_EUC_CN, "EUC_CN" },
+ { RTL_TEXTENCODING_EUC_TW, "EUC_TW" },
+ { RTL_TEXTENCODING_ISO_2022_JP, "ISO_2022_JP" },
+ { RTL_TEXTENCODING_ISO_2022_CN, "ISO_2022_CN" },
+ { RTL_TEXTENCODING_KOI8_R, "KOI8_R" },
+ { RTL_TEXTENCODING_UTF7, "UTF7" },
+ { RTL_TEXTENCODING_UTF8, "UTF8" },
+ { RTL_TEXTENCODING_ISO_8859_10, "ISO_8859_10" },
+ { RTL_TEXTENCODING_ISO_8859_13, "ISO_8859_13" },
+ { RTL_TEXTENCODING_EUC_KR, "EUC_KR" },
+ { RTL_TEXTENCODING_ISO_2022_KR, "ISO_2022_KR" },
+ { RTL_TEXTENCODING_JIS_X_0208, "JISX_0208_1983" },
+ { RTL_TEXTENCODING_JIS_X_0201, "JISX_0201_1976" },
+ { RTL_TEXTENCODING_JIS_X_0212, "JISX_0212_1990" },
+ #ifdef __notdef__
+ { RTL_TEXTENCODING_KSC_5601_1992, "KSC_5601_1992" },
+ { RTL_TEXTENCODING_TIS_620_2533, "TIS_620_2533" },
+ { RTL_TEXTENCODING_SUNUDC_1997, "SUNUDC_1997" },
+ #endif
+ { RTL_TEXTENCODING_STD_COUNT, "STD_COUNT" },
+ { RTL_TEXTENCODING_USER_START, "USER_START" },
+ { RTL_TEXTENCODING_USER_END, "USER_END" },
+ { RTL_TEXTENCODING_UCS4, "UCS4" },
+ { RTL_TEXTENCODING_UCS2, "UCS2" },
+ { RTL_TEXTENCODING_UNICODE, "UNICODE" }
+};
+
+extern "C" const char*
+pGetEncodingName( rtl_TextEncoding nEncoding )
+{
+ for ( int i = 0; i < sizeof(pRTLEncoding)/sizeof(DescriptionT); i++ )
+ if ( nEncoding == pRTLEncoding[i].nEncoding )
+ return pRTLEncoding[i].pEncoding;
+
+ static const char p_nil[] = "not_in_list";
+ return p_nil;
+}
+
diff --git a/vcl/unx/source/gdi/salcvt.hxx b/vcl/unx/source/gdi/salcvt.hxx
new file mode 100644
index 000000000000..540f879af9d5
--- /dev/null
+++ b/vcl/unx/source/gdi/salcvt.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * $RCSfile: salcvt.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef SAL_CONVERTER_CACHE_HXX_
+#define SAL_CONVERTER_CACHE_HXX_
+
+#ifndef _SALUNX_H
+#include <salunx.h>
+#endif
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+#ifndef _RTL_TEXTCVT_H
+#include <rtl/textcvt.h>
+#endif
+
+extern "C" const char*
+pGetEncodingName( rtl_TextEncoding nEncoding );
+
+//
+// Cache TextToUnicode and UnicodeToText converter and conversion info which is
+// used in DrawXYZ routines and in the Event loop
+//
+
+class SalConverterCache {
+
+ public:
+ SalConverterCache();
+ ~SalConverterCache();
+ Bool EncodingHasChar(
+ rtl_TextEncoding nEncoding, sal_Unicode nChar );
+ rtl_UnicodeToTextConverter
+ GetU2TConverter( rtl_TextEncoding nEncoding );
+ rtl_TextToUnicodeConverter
+ GetT2UConverter( rtl_TextEncoding nEncoding );
+ Bool IsSingleByteEncoding( rtl_TextEncoding nEncoding );
+
+ private:
+
+ typedef struct {
+ rtl_UnicodeToTextConverter mpU2T;
+ rtl_TextToUnicodeConverter mpT2U;
+ Bool mbSingleByteEncoding;
+ Bool mbValid;
+ } ConverterT;
+
+ ConverterT *mpConverter;
+};
+
+// wrapper for rtl_convertUnicodeToText that handles the usual cases for
+// textconversion in drawtext routines
+sal_Size
+ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
+ sal_Char *pBuffer, sal_Size nBufferSize,
+ rtl_UnicodeToTextConverter aConverter );
+
+
+#endif /* SAL_CONVERTER_CACHE_HXX_ */
+
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
new file mode 100644
index 000000000000..856502a294ba
--- /dev/null
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -0,0 +1,975 @@
+/*************************************************************************
+ *
+ * $RCSfile: salgdi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALGDI_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <prex.h>
+#include <X11/Xproto.h>
+#include <postx.h>
+
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+
+#include <tools/debug.hxx>
+
+#ifndef PRINTER_DUMMY
+#define Font XLIB_Font
+#define Region XLIB_Region
+#include <xprinter/xp.h>
+#undef Font
+#undef Region
+#endif
+
+// -=-= SalPolyLine =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#define STATIC_POINTS 64
+
+class SalPolyLine
+{
+ XPoint Points_[STATIC_POINTS];
+ XPoint *pFirst_;
+public:
+ inline SalPolyLine( ULONG nPoints );
+ inline SalPolyLine( ULONG nPoints, const SalPoint *p );
+ inline ~SalPolyLine();
+ inline XPoint &operator [] ( ULONG n ) const
+ { return pFirst_[n]; }
+};
+
+inline SalPolyLine::SalPolyLine( ULONG nPoints )
+ : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
+{}
+
+inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p )
+ : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
+{
+ for( ULONG i = 0; i < nPoints; i++ )
+ {
+ pFirst_[i].x = (short)p[i].mnX;
+ pFirst_[i].y = (short)p[i].mnY;
+ }
+ pFirst_[nPoints] = pFirst_[0]; // close polyline
+}
+
+inline SalPolyLine::~SalPolyLine()
+{ if( pFirst_ != Points_ ) delete pFirst_; }
+
+#undef STATIC_POINTS
+// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalGraphicsData::SalGraphicsData()
+{
+ hDrawable_ = None;
+
+ pClipRegion_ = NULL;
+ pPaintRegion_ = NULL;
+
+ pPenGC_ = NULL;
+ nPenPixel_ = 0;
+ nPenColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
+
+ pFontGC_ = NULL;
+// xFont_ = NULL;
+ aScale_ = Fraction( 1, 1 );
+ nTextPixel_ = 0;
+ nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
+
+ pBrushGC_ = NULL;
+ nBrushPixel_ = 0;
+ nBrushColor_ = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ); // White
+ hBrush_ = None;
+
+ pMonoGC_ = NULL;
+ pCopyGC_ = NULL;
+ pMaskGC_ = NULL;
+ pInvertGC_ = NULL;
+ pInvert50GC_ = NULL;
+ pStippleGC_ = NULL;
+ pTrackingGC_ = NULL;
+
+ bWindow_ = FALSE;
+ bPrinter_ = FALSE;
+ bVirDev_ = FALSE;
+ bPenGC_ = FALSE;
+ bFontGC_ = FALSE;
+ bBrushGC_ = FALSE;
+ bMonoGC_ = FALSE;
+ bCopyGC_ = FALSE;
+ bInvertGC_ = FALSE;
+ bInvert50GC_ = FALSE;
+ bStippleGC_ = FALSE;
+ bTrackingGC_ = FALSE;
+ bXORMode_ = FALSE;
+ bDitherBrush_ = FALSE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalGraphicsData::~SalGraphicsData()
+{
+ Display *pDisplay = GetXDisplay();
+
+ DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" )
+ if( pClipRegion_ ) XDestroyRegion( pClipRegion_ );
+
+ if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ );
+ if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ );
+ if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ );
+ if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ );
+ if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ );
+ if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ );
+ if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ );
+ if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ );
+ if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ );
+ if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ );
+ if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+beta void SalGraphicsData::DeInit()
+{
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalGraphicsData::SetClipRegion( GC pGC, XLIB_Region pXReg ) const
+{
+ Display *pDisplay = GetXDisplay();
+
+ int n = 0;
+ XLIB_Region Regions[3];
+
+ if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ )
+ Regions[n++] = pClipRegion_;
+// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ )
+// Regions[n++] = pPaintRegion_;
+ if( pXReg && !XEmptyRegion( pXReg ) )
+ Regions[n++] = pXReg;
+
+ if( 0 == n )
+ XSetClipMask( pDisplay, pGC, None );
+ else if( 1 == n )
+ XSetRegion( pDisplay, pGC, Regions[0] );
+ else
+ {
+ XLIB_Region pTmpRegion = XCreateRegion();
+ XIntersectRegion( Regions[0], Regions[1], pTmpRegion );
+// if( 3 == n )
+// XIntersectRegion( Regions[2], pTmpRegion, pTmpRegion );
+ XSetRegion( pDisplay, pGC, pTmpRegion );
+ XDestroyRegion( pTmpRegion );
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::SelectPen()
+{
+ Display *pDisplay = GetXDisplay();
+
+ DBG_ASSERT( nPenColor_ != 0xFFFFFFFF, "Pen Transparent" );
+
+ if( !pPenGC_ )
+ {
+ XGCValues values;
+ values.subwindow_mode = IncludeInferiors;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = True;
+
+ pPenGC_ = XCreateGC( pDisplay, hDrawable_,
+ GCSubwindowMode | GCFillRule | GCGraphicsExposures,
+ &values );
+ }
+
+ if( !bPenGC_ )
+ {
+ XSetForeground( pDisplay, pPenGC_, nPenPixel_ );
+ XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy );
+ SetClipRegion( pPenGC_ );
+ bPenGC_ = TRUE;
+ }
+
+ return pPenGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::SelectBrush()
+{
+ Display *pDisplay = GetXDisplay();
+
+ DBG_ASSERT( nBrushColor_ != 0xFFFFFFFF, "Brush Transparent" );
+
+ if( !pBrushGC_ )
+ {
+ XGCValues values;
+ values.subwindow_mode = IncludeInferiors;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = True;
+
+ pBrushGC_ = XCreateGC( pDisplay, hDrawable_,
+ GCSubwindowMode | GCFillRule | GCGraphicsExposures,
+ &values );
+ }
+
+ if( !bBrushGC_ )
+ {
+ if( !bDitherBrush_ )
+ {
+ XSetFillStyle ( pDisplay, pBrushGC_, FillSolid );
+ XSetForeground( pDisplay, pBrushGC_, nBrushPixel_ );
+ if( bPrinter_ )
+ XSetTile( pDisplay, pBrushGC_, None );
+ }
+ else
+ {
+ // Bug in Sun Solaris 2.5.1, XFillPolygon doesn't allways reflect
+ // changes of the tile. PROPERTY_BUG_Tile doesn't fix this !
+ if (GetDisplay()->GetProperties() & PROPERTY_BUG_FillPolygon_Tile)
+ XSetFillStyle ( pDisplay, pBrushGC_, FillSolid );
+
+ XSetFillStyle ( pDisplay, pBrushGC_, FillTiled );
+ XSetTile ( pDisplay, pBrushGC_, hBrush_ );
+ }
+ XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy );
+ SetClipRegion( pBrushGC_ );
+ bBrushGC_ = TRUE;
+ }
+
+ return pBrushGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::GetTrackingGC()
+{
+ const char dash_list[2] = {2, 2};
+
+ if( !pTrackingGC_ )
+ {
+ XGCValues values;
+
+ values.graphics_exposures = True;
+ values.foreground = xColormap_->GetBlackPixel()
+ ^ xColormap_->GetWhitePixel();
+ values.function = GXxor;
+ values.line_width = 1;
+ values.line_style = LineOnOffDash;
+
+ pTrackingGC_ = XCreateGC( GetXDisplay(), GetDrawable(),
+ GCGraphicsExposures | GCForeground | GCFunction
+ | GCLineWidth | GCLineStyle,
+ &values );
+ XSetDashes( GetXDisplay(), pTrackingGC_, 0, dash_list, 2 );
+ }
+
+ if( !bTrackingGC_ )
+ {
+ SetClipRegion( pTrackingGC_ );
+ bTrackingGC_ = TRUE;
+ }
+
+ return pTrackingGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphicsData::DrawLines( ULONG nPoints,
+ const SalPolyLine &rPoints,
+ GC pGC )
+{
+ // errechne wie viele Linien XWindow auf einmal zeichnen kann
+ ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq))
+ / sizeof(xPoint);
+ if( nMaxLines > nPoints ) nMaxLines = nPoints;
+
+ // gebe alle Linien aus, die XWindows zeichnen kann.
+ ULONG n;
+ for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 )
+ XDrawLines( GetXDisplay(),
+ GetDrawable(),
+ pGC,
+ &rPoints[n],
+ nMaxLines,
+ CoordModeOrigin );
+
+ if( n < nPoints )
+ XDrawLines( GetXDisplay(),
+ GetDrawable(),
+ pGC,
+ &rPoints[n],
+ nPoints - n,
+ CoordModeOrigin );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Dithern: Calculate a dither-pixmap and make a brush of it
+#define P_DELTA 51
+#define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA))
+
+final BOOL SalGraphicsData::GetDitherPixmap( SalColor nSalColor )
+{
+ static const short nOrdDither8Bit[ 8 ][ 8 ] =
+ {
+ 0, 38, 9, 48, 2, 40, 12, 50,
+ 25, 12, 35, 22, 28, 15, 37, 24,
+ 6, 44, 3, 41, 8, 47, 5, 44,
+ 32, 19, 28, 16, 34, 21, 31, 18,
+ 1, 40, 11, 49, 0, 39, 10, 48,
+ 27, 14, 36, 24, 26, 13, 36, 23,
+ 8, 46, 4, 43, 7, 45, 4, 42,
+ 33, 20, 30, 17, 32, 20, 29, 16
+ };
+
+ // test for correct depth (8bit)
+ if( GetColormap().GetVisual()->GetDepth() != 8 )
+ return FALSE;
+
+ char pBits[64];
+ char *pBitsPtr = pBits;
+
+ // Set the pallette-entries for the dithering tile
+ UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor );
+ UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor );
+ UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor );
+
+ for( int nY = 0; nY < 8; nY++ )
+ {
+ for( int nX = 0; nX < 8; nX++ )
+ {
+ short nMagic = nOrdDither8Bit[nY][nX];
+ UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic );
+ UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic );
+ UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic );
+
+ *pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) );
+ }
+ }
+
+ // create the tile as ximage and an according pixmap -> caching
+ XImage *pImage = XCreateImage( GetXDisplay(),
+ GetColormap().GetXVisual(),
+ 8,
+ ZPixmap,
+ 0, // offset
+ pBits, // data
+ 8, 8, // width & height
+ 8, // bitmap_pad
+ 0 ); // (default) bytes_per_line
+
+ if ( GetDisplay()->GetProperties() & PROPERTY_BUG_Tile )
+ {
+ if (hBrush_)
+ XFreePixmap (GetXDisplay(), hBrush_);
+ hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 );
+ }
+ else
+ if( !hBrush_ )
+ hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 );
+
+ // put the ximage to the pixmap
+ XPutImage( GetXDisplay(),
+ hBrush_,
+ GetDisplay()->GetCopyGC(),
+ pImage,
+ 0, 0, // Source
+ 0, 0, // Destination
+ 8, 8 ); // width & height
+
+ // destroy image-frame but not palette-data
+ pImage->data = NULL;
+ XDestroyImage( pImage );
+
+ return TRUE;
+}
+
+// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalGraphics::SalGraphics()
+{ }
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalGraphics::~SalGraphics()
+{ }
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::GetResolution( long &rDPIX, long &rDPIY ) // const
+{
+ SalDisplay *pDisplay = _GetDisplay();
+
+ rDPIX = pDisplay->GetResolution().A();
+ rDPIY = pDisplay->GetResolution().B();
+ if ( rDPIY < 96 )
+ {
+ rDPIX = Divide( rDPIX * 96, rDPIY );
+ rDPIY = 96;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::GetScreenFontResolution( long &rDPIX, long &rDPIY ) // const
+{
+ GetResolution ( rDPIX, rDPIY );
+
+ if( rDPIY < 108 )
+ {
+ rDPIX = Divide( rDPIX * 108, rDPIY );
+ rDPIY = 108;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final USHORT SalGraphics::GetBitCount() // const
+{ return _GetVisual()->GetDepth(); }
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::ResetClipRegion()
+{
+ if( _GetClipRegion() )
+ {
+ _IsPenGC() = FALSE;
+ _IsFontGC() = FALSE;
+ _IsBrushGC() = FALSE;
+ _IsMonoGC() = FALSE;
+ _IsCopyGC() = FALSE;
+ _IsInvertGC() = FALSE;
+ _IsInvert50GC() = FALSE;
+ _IsStippleGC() = FALSE;
+ _IsTrackingGC() = FALSE;
+
+ XDestroyRegion( _GetClipRegion() );
+ _GetClipRegion() = NULL;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::BeginSetClipRegion( ULONG )
+{
+ if( _GetClipRegion() )
+ XDestroyRegion( _GetClipRegion() );
+ _GetClipRegion() = XCreateRegion();
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nDX, long nDY )
+{
+#ifdef DBG_UTIL
+ if( nDX <= 0 || nX + nDX > 32767 )
+ fprintf( stderr, "CombineClipRegion %ld %ld\n", nX, nDX );
+ if( nDY <= 0 || nX + nDY > 32767 )
+ fprintf( stderr, "CombineClipRegion %ld %ld\n", nY, nDY );
+#endif
+ if (!nDX || !nDY)
+ return TRUE;
+
+ XRectangle aRect;
+ aRect.x = (short)nX;
+ aRect.y = (short)nY;
+ aRect.width = (unsigned short)nDX;
+ aRect.height = (unsigned short)nDY;
+
+ XUnionRectWithRegion( &aRect, _GetClipRegion(), _GetClipRegion() );
+
+ return TRUE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::EndSetClipRegion()
+{
+ _IsPenGC() = FALSE;
+ _IsFontGC() = FALSE;
+ _IsBrushGC() = FALSE;
+ _IsMonoGC() = FALSE;
+ _IsCopyGC() = FALSE;
+ _IsInvertGC() = FALSE;
+ _IsInvert50GC() = FALSE;
+ _IsStippleGC() = FALSE;
+ _IsTrackingGC() = FALSE;
+
+// if( _GetPaintRegion() )
+// XIntersectRegion( _GetClipRegion(), _GetPaintRegion(), _GetClipRegion() );
+// else
+
+ if( XEmptyRegion( _GetClipRegion() ) )
+ {
+ XDestroyRegion( _GetClipRegion() );
+ _GetClipRegion() = NULL;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetLineColor()
+{
+ if( _GetPenColor() != 0xFFFFFFFF )
+ {
+ _GetPenColor() = 0xFFFFFFFF;
+ _IsPenGC() = FALSE;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetLineColor( SalColor nSalColor )
+{
+ if( _GetPenColor() != nSalColor )
+ {
+ _GetPenColor() = nSalColor;
+ _GetPenPixel() = _GetPixel( nSalColor );
+ _IsPenGC() = FALSE;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetFillColor()
+{
+ if( _GetBrushColor() != 0xFFFFFFFF )
+ {
+ _IsDitherBrush() = FALSE;
+ _GetBrushColor() = 0xFFFFFFFF;
+ _IsBrushGC() = FALSE;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetFillColor( SalColor nSalColor )
+{
+ if( _GetBrushColor() != nSalColor )
+ {
+ _IsDitherBrush() = FALSE;
+ _GetBrushColor() = nSalColor;
+ _GetBrushPixel() = _GetPixel( nSalColor );
+ if( TrueColor != _GetColormap().GetVisual()->GetClass()
+ && _GetColor( _GetBrushPixel() ) != _GetBrushColor()
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x80 ) // blue
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x00 ) // green
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x80 ) // cyan
+ && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x00 ) // red
+ && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x80 ) // magenta
+ && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x00 ) // brown
+ && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x80 ) // gray
+ && nSalColor != MAKE_SALCOLOR( 0xC0, 0xC0, 0xC0 ) // light gray
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0xFF ) // light blue
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0x00 ) // light green
+ && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0xFF ) // light cyan
+ && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0x00 ) // light red
+ && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0xFF ) // light magenta
+ && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown
+ && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) )
+ _IsDitherBrush() = maGraphicsData.GetDitherPixmap(nSalColor);
+ _IsBrushGC() = FALSE;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetROPLineColor( SalROPColor nROPColor )
+{
+ switch( nROPColor )
+ {
+ case SAL_ROP_0 : // 0
+ _GetPenPixel() = (Pixel)0;
+ break;
+ case SAL_ROP_1 : // 1
+ _GetPenPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1;
+ break;
+ case SAL_ROP_INVERT : // 2
+ _GetPenPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1;
+ break;
+ }
+ _GetPenColor() = _GetColor( _GetPenPixel() );
+ _IsPenGC() = FALSE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetROPFillColor( SalROPColor nROPColor )
+{
+ switch( nROPColor )
+ {
+ case SAL_ROP_0 : // 0
+ _GetBrushPixel() = (Pixel)0;
+ break;
+ case SAL_ROP_1 : // 1
+ _GetBrushPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1;
+ break;
+ case SAL_ROP_INVERT : // 2
+ _GetBrushPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1;
+ break;
+ }
+ _IsDitherBrush() = FALSE;
+ _GetBrushColor() = _GetColor( _GetBrushPixel() );
+ _IsBrushGC() = FALSE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::SetXORMode( BOOL bSet )
+{
+ if( !_IsXORMode() == bSet )
+ {
+ _IsXORMode() = bSet;
+ _IsPenGC() = FALSE;
+ _IsBrushGC() = FALSE;
+ _IsMonoGC() = FALSE;
+ _IsCopyGC() = FALSE;
+ _IsInvertGC() = FALSE;
+ _IsInvert50GC() = FALSE;
+ _IsStippleGC() = FALSE;
+ _IsTrackingGC() = FALSE;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawPixel( long nX, long nY )
+{
+ if( _GetPenColor() != 0xFFFFFFFF )
+ XDrawPoint( _GetXDisplay(), _GetDrawable(), _SelectPen(), nX, nY );
+}
+
+final void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor )
+{
+ if( nSalColor != 0xFFFFFFFF )
+ {
+ Display *pDisplay = _GetXDisplay();
+
+ if( _GetPenColor() == 0xFFFFFFFF && !_IsPenGC() )
+ {
+ SetLineColor( nSalColor );
+ XDrawPoint( pDisplay, _GetDrawable(), _SelectPen(), nX, nY );
+ _GetPenColor() = 0xFFFFFFFF;
+ _IsPenGC() = False;
+ }
+ else
+ {
+ GC pGC = _SelectPen();
+
+ if( nSalColor != _GetPenColor() )
+ XSetForeground( pDisplay, pGC, _GetPixel( nSalColor ) );
+
+ XDrawPoint( pDisplay, _GetDrawable(), pGC, nX, nY );
+
+ if( nSalColor != _GetPenColor() )
+ XSetForeground( pDisplay, pGC, _GetPenPixel() );
+ }
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2 )
+{
+ if( _GetPenColor() != 0xFFFFFFFF )
+ {
+ if ( _GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine )
+ {
+ GC aGC = _SelectPen();
+ XDrawPoint (_GetXDisplay(), _GetDrawable(), aGC, (int)nX1, (int)nY1);
+ XDrawPoint (_GetXDisplay(), _GetDrawable(), aGC, (int)nX2, (int)nY2);
+ XDrawLine (_GetXDisplay(), _GetDrawable(), aGC, nX1, nY1, nX2, nY2 );
+ }
+ else
+ XDrawLine( _GetXDisplay(), _GetDrawable(),_SelectPen(),
+ nX1, nY1, nX2, nY2 );
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalGraphics::DrawRect( long nX, long nY, long nDX, long nDY )
+{
+ if( _GetBrushColor() != 0xFFFFFFFF )
+ XFillRectangle( _GetXDisplay(),
+ _GetDrawable(),
+ _SelectBrush(),
+ nX, nY, nDX, nDY );
+
+ // Beschreibung DrawRect verkehrt, deshalb -1
+ if( _GetPenColor() != 0xFFFFFFFF )
+ XDrawRectangle( _GetXDisplay(),
+ _GetDrawable(),
+ _SelectPen(),
+ nX, nY, nDX-1, nDY-1 );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#if 0
+// Ausgetauscht durch SalGraphics::Invert
+final void SalGraphics::InvertTracking( ULONG nPoints, const SalPoint *pPtAry )
+{
+ SalPolyLine Points( nPoints, pPtAry );
+
+ maGraphicsData.DrawLines( nPoints, Points, _GetTrackingGC() );
+}
+#endif
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+{
+ if( _GetPenColor() != 0xFFFFFFFF )
+ {
+ SalPolyLine Points( nPoints, pPtAry );
+
+ maGraphicsData.DrawLines( nPoints, Points, _SelectPen() );
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+{
+ if( nPoints < 3 )
+ {
+ if( !nPoints )
+ {
+#ifdef DBG_UTIL
+ fprintf( stderr, "SalGraphics::DrawPolygon !nPoints\n" );
+#endif
+ }
+ else if( !_IsXORMode() )
+ {
+ if( 1 == nPoints )
+ DrawPixel( pPtAry[0].mnX, pPtAry[0].mnY );
+ else
+ DrawLine( pPtAry[0].mnX, pPtAry[0].mnY,
+ pPtAry[1].mnX, pPtAry[1].mnY );
+ }
+ return;
+ }
+
+ SalPolyLine Points( nPoints, pPtAry );
+
+ nPoints++;
+
+ if( _GetBrushColor() != 0xFFFFFFFF )
+ XFillPolygon( _GetXDisplay(),
+ _GetDrawable(),
+ _SelectBrush(),
+ &Points[0], nPoints,
+ Complex, CoordModeOrigin );
+
+ if( _GetPenColor() != 0xFFFFFFFF )
+ maGraphicsData.DrawLines( nPoints, Points, _SelectPen() );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalGraphics::DrawPolyPolygon( ULONG nPoly,
+ const ULONG *pPoints,
+ PCONSTSALPOINT *pPtAry )
+{
+ if( _GetBrushColor() != 0xFFFFFFFF )
+ {
+ ULONG i, n;
+ XLIB_Region pXRegA = NULL;
+
+#ifdef CLIPPING
+ Size aOutSize = pOutDev->GetOutputSizePixel();
+
+ ClipRectangle aClippingRect( Point(0,0),
+ Point(aOutSize.Width(), aOutSize.Height()) );
+
+ ULONG nMax = pPoints[0];
+ for( i = 1; i < nPoly; i++ )
+ if( pPoints[i] > nMax )
+ nMax = pPoints[i];
+
+ SalPolyLine Points( nMax * 2 );
+
+ for( i = 0; i < nPoly; i++ )
+ {
+ n = aClippingRect.ClipPolygon( pPoints[i], pPtAry[i], &Points[0] );
+#else
+ for( i = 0; i < nPoly; i++ ) {
+ n = pPoints[i];
+ SalPolyLine Points( n, pPtAry[i] );
+#endif
+ if( n > 2 )
+ {
+ XLIB_Region pXRegB = XPolygonRegion( &Points[0], n+1, WindingRule );
+ if( !pXRegA )
+ pXRegA = pXRegB;
+ else
+ {
+ XXorRegion( pXRegA, pXRegB, pXRegA );
+ XDestroyRegion( pXRegB );
+ }
+ }
+ }
+
+ if( pXRegA )
+ {
+ XRectangle aXRect;
+ XClipBox( pXRegA, &aXRect );
+
+ GC pGC = _SelectBrush();
+ maGraphicsData.SetClipRegion( pGC, pXRegA ); // ??? doppelt
+ XDestroyRegion( pXRegA );
+ _IsBrushGC() = FALSE;
+
+ XFillRectangle( _GetXDisplay(),
+ _GetDrawable(),
+ pGC,
+ aXRect.x, aXRect.y, aXRect.width, aXRect.height );
+ }
+ }
+
+ if( _GetPenColor() != 0xFFFFFFFF )
+ for( ULONG i = 0; i < nPoly; i++ )
+ DrawPolyLine( pPoints[i], pPtAry[i] );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+beta void SalGraphics::Invert( ULONG nPoints,
+ const SalPoint* pPtAry,
+ SalInvert nFlags )
+{
+ SalDisplay *pDisp = _GetDisplay();
+ SalPolyLine Points ( nPoints, pPtAry );
+
+ GC pGC;
+ if( SAL_INVERT_50 & nFlags )
+ pGC = maGraphicsData.GetInvert50GC();
+ else
+ if ( SAL_INVERT_TRACKFRAME & nFlags )
+ pGC = maGraphicsData.GetTrackingGC();
+ else
+ pGC = maGraphicsData.GetInvertGC();
+
+ maGraphicsData.DrawLines ( nPoints, Points, pGC );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#if 0
+ struct XpEPS_trf
+ {
+ double origin_x, origin_y;
+ double scale_x, scale_y;
+ double rotate;
+ };
+ struct XpBox
+ {
+ double llx,lly;
+ double urx,ury;
+ };
+ extern "C" void* XpEPS_Put( Display*, FILE*, struct XpEPS_trf* );
+ extern "C" struct XpBox* XpEPS_GetBoundingBox( Display*, FILE* );
+#endif
+
+BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize )
+{
+#ifndef PRINTER_DUMMY
+ if( _IsPrinter() )
+ {
+ // convert \r to \n (#60367#, EPS-files with mac format)
+ // this should not tangle with other lineends
+ // in postscript files \r and \n count as whitespace
+ // so they can only be addressed directly as hex codes <0a> etc.
+ char* pRun = (char*)pPtr;
+ while( (ULONG)(pRun - (char*)pPtr) < nSize )
+ {
+ if( *pRun == '\r' )
+ *pRun = '\n';
+ pRun++;
+ }
+
+ FILE* fp = tmpfile();
+ if( ! fp )
+ return FALSE;
+ fwrite( pPtr, 1, nSize, fp );
+ fseek( fp, 0, SEEK_SET );
+
+ // holt die BoundingBox in pixel
+ XpBox* pBox = XpEPS_GetBoundingBox( _GetXDisplay(), fp );
+ fseek( fp, 0, SEEK_SET );
+ XpEPS_trf aTransfer;
+ aTransfer.origin_x = nX;
+ aTransfer.origin_y = nY;
+ aTransfer.rotate = 0;
+ if( pBox )
+ {
+ aTransfer.scale_x = ((double)nWidth)/( pBox->urx - pBox->llx );
+ aTransfer.scale_x = aTransfer.scale_x < 0 ?
+ -aTransfer.scale_x : aTransfer.scale_x;
+ aTransfer.scale_y = ((double)nHeight)/( pBox->lly - pBox->ury );
+ aTransfer.scale_y = aTransfer.scale_y < 0 ?
+ -aTransfer.scale_y : aTransfer.scale_y;
+ }
+ else
+ {
+ aTransfer.scale_x = 1;
+ aTransfer.scale_y = 1;
+#if defined DEBUG
+ fprintf( stderr, "Warning: XpEPS_GetBoundingBox returned NULL\n" );
+#endif
+ }
+
+ XpEPS_Put( _GetXDisplay(), fp, &aTransfer );
+ fclose( fp ); // deletes tmpfile
+ free( pBox );
+
+ return TRUE;
+ }
+#endif
+ return FALSE;
+}
+
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
new file mode 100644
index 000000000000..49d547533586
--- /dev/null
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -0,0 +1,810 @@
+/*************************************************************************
+ *
+ * $RCSfile: salgdi2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALGDI2_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <stdio.h>
+
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALBMP_HXX
+#include <salbmp.hxx>
+#endif
+#ifndef _SV_SALBTYPE_HXX
+#include <salbtype.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef PRINTER_DUMMY
+#define Font XLIB_Font
+#define Region XLIB_Region
+#include <xprinter/xp.h>
+#undef Font
+#undef Region
+#endif
+
+#undef SALGDI2_TESTTRANS
+
+// -=-= debugging =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#ifdef DBG_UTIL
+
+static void sal_PrintImage( char *s, XImage*p )
+{
+ fprintf( stderr, "%s %d %d %d\n", s, p->depth, p->width, p->height );
+ int nW = Min( 64, p->width*p->bits_per_pixel >> 3 );
+ for( int i = 0; i < Min( 16, p->height ); i++ )
+ {
+ for( int j = 0; j < nW; j++ )
+ fprintf( stderr, "%02X", (UINT8)p->data[i*p->bytes_per_line+j] );
+ fprintf( stderr, "\n" );
+ }
+}
+
+#endif // DBG_UTIL
+
+// -----------------------------------------------------------------------------
+
+#if defined DEBUG && defined SALGDI2_TESTTRANS
+#define DBG_TESTTRANS( _def_drawable ) \
+{ \
+ XCopyArea( pXDisp, _def_drawable, aDrawable, _GetCopyGC(), \
+ 0, 0, \
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight, \
+ 0, 0 ); \
+}
+#else // DEBUG && defined SALGDI2_TESTTRANS
+#define DBG_TESTTRANS( _def_drawable )
+#endif // DEBUG && defined SALGDI2_TESTTRANS
+
+// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::CreateGC( Drawable hDrawable, unsigned long nMask )
+{
+ XGCValues values;
+
+ values.graphics_exposures = True;
+ values.foreground = xColormap_->GetBlackPixel()
+ ^ xColormap_->GetWhitePixel();
+ values.function = GXxor;
+ values.line_width = 1;
+ values.fill_style = FillStippled;
+ values.stipple = GetDisplay()->GetInvert50();
+
+ return XCreateGC( GetXDisplay(), hDrawable, nMask, &values );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final inline GC SalGraphicsData::GetMonoGC( Pixmap hPixmap )
+{
+ if( !pMonoGC_ )
+ pMonoGC_ = CreateGC( hPixmap );
+
+ if( !bMonoGC_ )
+ {
+ SetClipRegion( pMonoGC_ );
+ bMonoGC_ = TRUE;
+ }
+
+ return pMonoGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final inline GC SalGraphicsData::GetCopyGC()
+{
+ if( bXORMode_ ) return GetInvertGC();
+
+ if( !pCopyGC_ )
+ pCopyGC_ = CreateGC( GetDrawable() );
+
+ if( !bCopyGC_ )
+ {
+ SetClipRegion( pCopyGC_ );
+ bCopyGC_ = TRUE;
+ }
+ return pCopyGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::GetInvertGC()
+{
+ if( !pInvertGC_ )
+ pInvertGC_ = CreateGC( GetDrawable(),
+ GCGraphicsExposures
+ | GCForeground
+ | GCFunction
+ | GCLineWidth );
+
+ if( !bInvertGC_ )
+ {
+ SetClipRegion( pInvertGC_ );
+ bInvertGC_ = TRUE;
+ }
+ return pInvertGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::GetInvert50GC()
+{
+ if( !pInvert50GC_ )
+ {
+ XGCValues values;
+
+ values.graphics_exposures = True;
+ values.foreground = xColormap_->GetWhitePixel();
+ values.background = xColormap_->GetBlackPixel();
+ values.function = GXinvert;
+ values.line_width = 1;
+ values.line_style = LineSolid;
+ unsigned long nValueMask =
+ GCGraphicsExposures
+ | GCForeground
+ | GCBackground
+ | GCFunction
+ | GCLineWidth
+ | GCLineStyle
+ | GCFillStyle
+ | GCStipple;
+
+ char* pEnv = getenv( "SAL_DO_NOT_USE_INVERT50" );
+ if( pEnv && ! strcasecmp( pEnv, "true" ) )
+ {
+ values.fill_style = FillSolid;
+ nValueMask &= ~ GCStipple;
+ }
+ else
+ {
+ values.fill_style = FillStippled;
+ values.stipple = GetDisplay()->GetInvert50();
+ }
+
+ pInvert50GC_ = XCreateGC( GetXDisplay(), GetDrawable(),
+ nValueMask,
+ &values );
+ }
+
+ if( !bInvert50GC_ )
+ {
+ SetClipRegion( pInvert50GC_ );
+ bInvert50GC_ = TRUE;
+ }
+ return pInvert50GC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final inline GC SalGraphicsData::GetStippleGC()
+{
+ if( !pStippleGC_ )
+ pStippleGC_ = CreateGC( GetDrawable(),
+ GCGraphicsExposures
+ | GCFillStyle
+ | GCLineWidth );
+
+ if( !bStippleGC_ )
+ {
+ XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy );
+ SetClipRegion( pStippleGC_ );
+ bStippleGC_ = TRUE;
+ }
+
+ return pStippleGC_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final int SalGraphicsData::Clip( XLIB_Region pRegion,
+ int &nX,
+ int &nY,
+ unsigned int &nDX,
+ unsigned int &nDY,
+ int &nSrcX,
+ int &nSrcY ) const
+{
+ XRectangle aRect;
+ XClipBox( pRegion, &aRect );
+
+ if( nX + nDX <= aRect.x || nX >= aRect.x + aRect.width )
+ return RectangleOut;
+ if( nY + nDY <= aRect.y || nY >= aRect.y + aRect.height )
+ return RectangleOut;
+
+ if( nX < aRect.x )
+ {
+ nSrcX += aRect.x - nX;
+ nDX -= aRect.x - nX;
+ nX = aRect.x;
+ }
+ else if( nX + nDX > aRect.x + aRect.width )
+ nDX = aRect.x + aRect.width - nX;
+
+ if( nY < aRect.y )
+ {
+ nSrcY += aRect.y - nY;
+ nDY -= aRect.y - nY;
+ nY = aRect.y;
+ }
+ else if( nY + nDY > aRect.y + aRect.height )
+ nDY = aRect.y + aRect.height - nY;
+
+ return RectangleIn;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final int SalGraphicsData::Clip( int &nX,
+ int &nY,
+ unsigned int &nDX,
+ unsigned int &nDY,
+ int &nSrcX,
+ int &nSrcY ) const
+
+{
+ if( pPaintRegion_
+ && RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
+ return RectangleOut;
+
+ if( pClipRegion_
+ && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
+ return RectangleOut;
+
+ int nPaint;
+ if( pPaintRegion_ )
+ {
+ nPaint = XRectInRegion( pPaintRegion_, nX, nY, nDX, nDY );
+ if( RectangleOut == nPaint )
+ return RectangleOut;
+ }
+ else
+ nPaint = RectangleIn;
+
+ int nClip;
+ if( pClipRegion_ )
+ {
+ nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY );
+ if( RectangleOut == nClip )
+ return RectangleOut;
+ }
+ else
+ nClip = RectangleIn;
+
+ return RectangleIn == nClip && RectangleIn == nPaint
+ ? RectangleIn
+ : RectanglePart;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final GC SalGraphicsData::SetMask( int &nX,
+ int &nY,
+ unsigned int &nDX,
+ unsigned int &nDY,
+ int &nSrcX,
+ int &nSrcY,
+ Pixmap hClipMask )
+{
+ int n = Clip( nX, nY, nDX, nDY, nSrcX, nSrcY );
+ if( RectangleOut == n )
+ return NULL;
+
+ Display *pDisplay = GetXDisplay();
+
+ if( !pMaskGC_ )
+ pMaskGC_ = CreateGC( GetDrawable() );
+
+ if( RectangleIn == n )
+ {
+ XSetClipMask( pDisplay, pMaskGC_, hClipMask );
+ XSetClipOrigin( pDisplay, pMaskGC_, nX - nSrcX, nY - nSrcY );
+ return pMaskGC_;
+ }
+
+ // - - - - create alternate clip pixmap for region clipping - - - -
+ Pixmap hPixmap = XCreatePixmap( pDisplay, hClipMask, nDX, nDY, 1 );
+
+ if( !hPixmap )
+ {
+#if defined DEBUG || defined DBG_UTIL
+ fprintf( stderr, "SalGraphicsData::SetMask !hPixmap\n" );
+#endif
+ return NULL;
+ }
+
+ // - - - - reset pixmap; all 0 - - - - - - - - - - - - - - - - - - -
+ XFillRectangle( pDisplay,
+ hPixmap,
+ GetDisplay()->GetMonoGC(),
+ 0, 0,
+ nDX, nDY );
+
+ // - - - - copy pixmap only within region - - - - - - - - - - - - -
+ GC pMonoGC = GetMonoGC( hPixmap );
+ XSetClipOrigin( pDisplay, pMonoGC, -nX, -nY );
+ XCopyArea( pDisplay,
+ hClipMask, // Source
+ hPixmap, // Destination
+ pMonoGC,
+ nSrcX, nSrcY, // Source
+ nDX, nDY, // Width & Height
+ 0, 0 ); // Destination
+
+ XSetClipMask( pDisplay, pMaskGC_, hPixmap );
+ XSetClipOrigin( pDisplay, pMaskGC_, nX, nY );
+
+ XFreePixmap( pDisplay, hPixmap );
+ return pMaskGC_;
+}
+
+// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::CopyBits( const SalTwoRect *pPosAry,
+ SalGraphics *pSrcGraphics )
+{
+ if( pPosAry->mnSrcWidth <= 0
+ || pPosAry->mnSrcHeight <= 0
+ || pPosAry->mnDestWidth <= 0
+ || pPosAry->mnDestHeight <= 0 )
+ {
+ return;
+ }
+
+ int n;
+ if( !pSrcGraphics )
+ {
+ pSrcGraphics = this;
+ n = 2;
+ }
+ else if( pSrcGraphics->_IsWindow() )
+ // window or compatible virtual device
+ if( pSrcGraphics->_GetDisplay() == _GetDisplay() )
+ n = 2; // same Display
+ else
+ n = 1; // printer or other display
+ else if( pSrcGraphics->_IsVirtualDevice() )
+ // printer compatible virtual device
+ if( _IsPrinter() )
+ n = 2; // printer or compatible virtual device == same display
+ else
+ n = 1; // window or compatible virtual device
+ else
+ n = 0;
+
+ if( n == 2
+ && pPosAry->mnSrcWidth == pPosAry->mnDestWidth
+ && pPosAry->mnSrcHeight == pPosAry->mnDestHeight )
+ {
+ if( _IsXORMode()
+ && !pSrcGraphics->_IsVirtualDevice()
+ && (_GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) )
+ {
+ Pixmap hPixmap = XCreatePixmap( _GetXDisplay(),
+ pSrcGraphics->_GetDrawable(), // source
+ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ pSrcGraphics->GetBitCount() );
+ XCopyArea( _GetXDisplay(),
+ pSrcGraphics->_GetDrawable(), // source
+ hPixmap, // destination
+ _GetDisplay()->GetCopyGC(), // no clipping
+ pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ 0, 0 ); // destination
+ XCopyArea( _GetXDisplay(),
+ hPixmap, // source
+ _GetDrawable(), // destination
+ maGraphicsData.GetInvertGC(), // destination clipping
+ 0, 0, // source
+ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ pPosAry->mnDestX, pPosAry->mnDestY );
+ XFreePixmap( _GetXDisplay(), hPixmap );
+ }
+ else
+ XCopyArea( _GetXDisplay(),
+ pSrcGraphics->_GetDrawable(), // source
+ _GetDrawable(), // destination
+ maGraphicsData.GetCopyGC(), // destination clipping
+ pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ pPosAry->mnDestX, pPosAry->mnDestY );
+ }
+ else if( n )
+ {
+ SalBitmap *pDDB = pSrcGraphics->GetBitmap( pPosAry->mnSrcX,
+ pPosAry->mnSrcY,
+ pPosAry->mnSrcWidth,
+ pPosAry->mnSrcHeight );
+
+ if( !pDDB )
+ {
+ stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" );
+ return;
+ }
+
+ SalTwoRect aPosAry( *pPosAry );
+
+ aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0;
+ DrawBitmap( &aPosAry, *pDDB );
+
+ delete pDDB;
+ }
+ else
+ stderr0( "SalGraphics::CopyBits from Printer not yet implemented\n" );
+}
+
+// --------------------------------------------------------------------------
+
+final void SalGraphics::CopyArea ( long nDestX, long nDestY,
+ long nSrcX, long nSrcY,
+ long nSrcWidth, long nSrcHeight,
+ USHORT nFlags )
+{
+ SalTwoRect aPosAry;
+
+ aPosAry.mnDestX = nDestX;
+ aPosAry.mnDestY = nDestY;
+ aPosAry.mnDestWidth = nSrcWidth;
+ aPosAry.mnDestHeight = nSrcHeight;
+
+ aPosAry.mnSrcX = nSrcX;
+ aPosAry.mnSrcY = nSrcY;
+ aPosAry.mnSrcWidth = nSrcWidth;
+ aPosAry.mnSrcHeight = nSrcHeight;
+
+ CopyBits ( &aPosAry, 0 );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap )
+{
+ SalDisplay* pSalDisp = maGraphicsData.GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
+ const Drawable aDrawable( maGraphicsData.GetDrawable() );
+ const SalColormap& rColMap = pSalDisp->GetColormap();
+ const long nDepth = maGraphicsData.GetDisplay()->GetVisual()->GetDepth();
+ GC aGC( maGraphicsData.GetCopyGC() );
+ XGCValues aOldVal, aNewVal;
+ int nValues = GCForeground | GCBackground;
+
+ // set foreground/background values for 1Bit bitmaps
+ XGetGCValues( pXDisp, aGC, nValues, &aOldVal );
+ aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel();
+ XChangeGC( pXDisp, aGC, nValues, &aNewVal );
+
+ if( _IsPrinter() )
+ {
+ SalTwoRect aTwoRect = { pPosAry->mnSrcX, pPosAry->mnSrcY, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight };
+ XImage* pImage = rSalBitmap.ImplCreateXImage( pSalDisp, nDepth, aTwoRect );
+
+ if( pImage )
+ {
+ XpStretchPutImage( maGraphicsData.GetDisplay()->GetDisplay(), aDrawable, aGC, pImage,
+ 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+ pPosAry->mnDestX, pPosAry->mnDestY, pPosAry->mnDestWidth, pPosAry->mnDestHeight );
+
+ delete[] pImage->data, pImage->data = NULL;
+ XDestroyImage( pImage );
+ }
+ }
+ else
+ rSalBitmap.ImplDraw( aDrawable, nDepth, *pPosAry, aGC );
+
+ XChangeGC( pXDisp, aGC, nValues, &aOldVal );
+ XFlush( pXDisp );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+final void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransBitmap )
+{
+ DBG_ASSERT( !_IsPrinter(), "Drawing of transparent bitmaps on printer devices is strictly forbidden" );
+
+ SalDisplay* pSalDisp = maGraphicsData.GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
+ Drawable aDrawable( maGraphicsData.GetDrawable() );
+ const USHORT nDepth = pSalDisp->GetVisual()->GetDepth();
+ Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
+ pPosAry->mnDestHeight, nDepth ) );
+ Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
+ pPosAry->mnDestHeight, nDepth ) );
+
+ if( aFG && aBG )
+ {
+ GC aTmpGC;
+ XGCValues aValues;
+ const SalColormap& rColMap = pSalDisp->GetColormap();
+ const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel();
+ const int nValues = GCFunction | GCForeground | GCBackground;
+ SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0;
+
+ // draw paint bitmap in pixmap #1
+ aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack;
+ aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues );
+ rSalBitmap.ImplDraw( aFG, nDepth, aTmpRect, aTmpGC );
+ DBG_TESTTRANS( aFG );
+
+ // draw background in pixmap #2
+ XCopyArea( pXDisp, aDrawable, aBG, aTmpGC,
+ pPosAry->mnDestX, pPosAry->mnDestY,
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight,
+ 0, 0 );
+ DBG_TESTTRANS( aBG );
+
+ // mask out paint bitmap in pixmap #1 (transparent areas 0)
+ aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff;
+ XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
+ rTransBitmap.ImplDraw( aFG, 1, aTmpRect, aTmpGC );
+ DBG_TESTTRANS( aFG );
+
+ // mask out background in pixmap #2 (nontransparent areas 0)
+ aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000;
+ XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
+ rTransBitmap.ImplDraw( aBG, 1, aTmpRect, aTmpGC );
+ DBG_TESTTRANS( aBG );
+
+ // merge pixmap #1 and pixmap #2 in pixmap #2
+ aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000;
+ XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
+ XCopyArea( pXDisp, aFG, aBG, aTmpGC,
+ 0, 0,
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight,
+ 0, 0 );
+ DBG_TESTTRANS( aBG );
+
+ // copy pixmap #2 (result) to background
+ XCopyArea( pXDisp, aBG, aDrawable, maGraphicsData.GetCopyGC(),
+ 0, 0,
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight,
+ pPosAry->mnDestX, pPosAry->mnDestY );
+ DBG_TESTTRANS( aBG );
+
+ XFreeGC( pXDisp, aTmpGC );
+ XFlush( pXDisp );
+ }
+ else
+ DrawBitmap( pPosAry, rSalBitmap );
+
+ if( aFG )
+ XFreePixmap( pXDisp, aFG );
+
+ if( aBG )
+ XFreePixmap( pXDisp, aBG );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,
+ SalColor nTransparentColor )
+{
+ DBG_ERROR( "::DrawBitmap with transparent color not supported" );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::DrawMask( const SalTwoRect* pPosAry, const SalBitmap &rSalBitmap,
+ SalColor nMaskColor )
+{
+ SalDisplay* pSalDisp = maGraphicsData.GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
+ Drawable aDrawable( maGraphicsData.GetDrawable() );
+ Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable,
+ pPosAry->mnDestWidth,
+ pPosAry->mnDestHeight, 1 ) );
+
+ if( aStipple )
+ {
+ SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0;
+ GC aTmpGC;
+ XGCValues aValues;
+
+ // create a stipple bitmap first (set bits are changed to unset bits and vice versa)
+ aValues.function = GXcopyInverted;
+ aValues.foreground = 1, aValues.background = 0;
+ aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues );
+ rSalBitmap.ImplDraw( aStipple, 1, aTwoRect, aTmpGC );
+ XFreeGC( pXDisp, aTmpGC );
+
+ // Set stipple and draw rectangle
+ GC aStippleGC( maGraphicsData.GetStippleGC() );
+ int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY;
+
+ XSetStipple( pXDisp, aStippleGC, aStipple );
+ XSetTSOrigin( pXDisp, aStippleGC, nX, nY );
+ XSetForeground( pXDisp, aStippleGC, _GetPixel( nMaskColor ) );
+ XFillRectangle( pXDisp, aDrawable, aStippleGC,
+ nX, nY,
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight );
+ XFreePixmap( pXDisp, aStipple );
+ XFlush( pXDisp );
+ }
+ else
+ DrawBitmap( pPosAry, rSalBitmap );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalBitmap *SalGraphics::GetBitmap( long nX, long nY, long nDX, long nDY )
+{
+ if( _IsPrinter() && !_IsVirtualDevice() )
+ return NULL;
+
+ if( _IsWindow() && !_IsVirtualDevice() )
+ {
+ // normalize
+ if( nDX < 0 )
+ {
+ nX += nDX;
+ nDX = -nDX;
+ }
+ if ( nDY < 0 )
+ {
+ nY += nDY;
+ nDY = -nDY;
+ }
+
+ XWindowAttributes aAttrib;
+
+ XGetWindowAttributes( _GetXDisplay(), _GetDrawable(), &aAttrib );
+ if( aAttrib.map_state != IsViewable )
+ {
+ stderr0( "SalGraphics::GetBitmap drawable not viewable\n" );
+ return NULL;
+ }
+
+ // am Window clippen (eg)
+ if ( nX < 0 )
+ {
+ nDX += nX;
+ nX = 0;
+ }
+ if ( nY < 0 )
+ {
+ nDY += nY;
+ nY = 0;
+ }
+ if( nX + nDX > aAttrib.width )
+ nDX = aAttrib.width - nX;
+ if( nY + nDY > aAttrib.height )
+ nDY = aAttrib.height - nY;
+
+ // nun alles ok ?
+ if( nDX <= 0 || nDY <= 0 )
+ {
+ stderr0( "SalGraphics::GetBitmap zero sized bitmap after clipping\n" );
+ return NULL;
+ }
+ }
+
+ SalBitmap* pSalBitmap = new SalBitmap;
+ USHORT nBitCount = GetBitCount();
+
+ if( &_GetDisplay()->GetColormap() != &_GetColormap() )
+ nBitCount = 1;
+
+ pSalBitmap->ImplCreateFromDrawable( _GetDrawable(), nBitCount, nX, nY, nDX, nDY );
+
+ return pSalBitmap;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalColor SalGraphics::GetPixel( long nX, long nY )
+{
+ if( _IsWindow() && !_IsVirtualDevice() )
+ {
+ XWindowAttributes aAttrib;
+
+ XGetWindowAttributes( _GetXDisplay(), _GetDrawable(), &aAttrib );
+ if( aAttrib.map_state != IsViewable )
+ {
+ stderr0( "SalGraphics::GetPixel drawable not viewable\n" );
+ return 0;
+ }
+ }
+
+ XImage *pXImage = XGetImage( _GetXDisplay(),
+ _GetDrawable(),
+ nX, nY,
+ 1, 1,
+ AllPlanes,
+ ZPixmap );
+ if( !pXImage )
+ {
+ stderr0( "SalGraphics::GetPixel !XGetImage()\n" );
+ return 0;
+ }
+
+ XColor aXColor;
+
+ aXColor.pixel = XGetPixel( pXImage, 0, 0 );
+ XDestroyImage( pXImage );
+
+ return _GetColormap().GetColor( aXColor.pixel );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphics::Invert( long nX,
+ long nY,
+ long nDX,
+ long nDY,
+ SalInvert nFlags )
+{
+ SalDisplay *pDisp = _GetDisplay();
+
+ GC pGC;
+ if( SAL_INVERT_50 & nFlags )
+ {
+ pGC = maGraphicsData.GetInvert50GC();
+ XFillRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY );
+ }
+ else
+ if ( SAL_INVERT_TRACKFRAME & nFlags )
+ {
+ pGC = maGraphicsData.GetTrackingGC();
+ XDrawRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY );
+ }
+ else
+ {
+ pGC = maGraphicsData.GetInvertGC();
+ XFillRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY );
+ }
+}
+
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
new file mode 100644
index 000000000000..5b738f2a5de8
--- /dev/null
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -0,0 +1,1074 @@
+/*************************************************************************
+ *
+ * $RCSfile: salgdi3.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALGDI3_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <assert.h>
+#include <alloca.h>
+
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef _SV_OUTFONT_HXX
+#include <outfont.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _SV_POLY_HXX
+#include <poly.hxx>
+#endif
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+
+#include <tools/debug.hxx>
+#include <tools/stream.hxx>
+
+#ifndef PRINTER_DUMMY
+#define Font XLIB_Font
+#define Region XLIB_Region
+#include <xprinter/xp.h>
+#undef Font
+#undef Region
+#endif
+
+#ifndef ANSI1252_HXX_
+#include "ansi1252.hxx"
+#endif
+#ifndef XLFD_ATTRIBUTE_HXX
+#include "xlfd_attr.hxx"
+#endif
+#ifndef XLFD_SIMPLE_HXX
+#include "xlfd_smpl.hxx"
+#endif
+#ifndef XLFD_EXTENDED_HXX
+#include "xlfd_extd.hxx"
+#endif
+#ifndef SAL_CONVERTER_CACHE_HXX_
+#include "salcvt.hxx"
+#endif
+#include <osl/types.h>
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#ifndef PRINTER_DUMMY
+static void
+FaxPhoneComment( Display* pDisplay, const sal_Unicode* pStr, USHORT nLen )
+{
+ #define FAX_PHONE_TOKEN "@@#"
+ #define FAX_PHONE_TOKEN_LENGTH 3
+ #define FAX_END_TOKEN "@@"
+
+ USHORT nPos;
+ ByteString aPhone( pStr, nLen, gsl_getSystemTextEncoding() );
+
+ static ByteString aPhoneNumber;
+ static BOOL bIsCollecting = FALSE;
+
+ if( ! bIsCollecting )
+ {
+ if( ( nPos = aPhone.Search( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND )
+ {
+ aPhone.Erase( 0, nPos + FAX_PHONE_TOKEN_LENGTH );
+ bIsCollecting = TRUE;
+ aPhoneNumber.Erase();
+ }
+ }
+ if( bIsCollecting )
+ {
+ if( ( nPos = aPhone.Search( FAX_END_TOKEN ) ) != STRING_NOTFOUND )
+ {
+ aPhone.Erase( nPos );
+ bIsCollecting = FALSE;
+ }
+ aPhoneNumber += aPhone;
+ if( ! bIsCollecting )
+ {
+ aPhone = "PhoneNumber(";
+ aPhone += aPhoneNumber;
+ aPhone += ")\n";
+ XpPSComment( pDisplay, aPhone.GetBuffer() );
+ aPhoneNumber = ByteString();
+ }
+ }
+ if( aPhoneNumber.Len() > 1024 )
+ {
+ bIsCollecting = FALSE;
+ aPhoneNumber = ByteString();
+ }
+}
+#endif
+
+// ----------------------------------------------------------------------------
+//
+// SalDisplay
+//
+// ----------------------------------------------------------------------------
+
+XlfdStorage*
+SalDisplay::GetXlfdList()
+{
+ if ( mpFontList != NULL )
+ {
+ return mpFontList;
+ }
+ else
+ {
+ // on a display an xlfd of *-0-0-75-75-* means this is a scalable
+ // bitmap font, thus it is ugly and thus to avoid. On a printer
+ // *-0-0-300-300-* means this is a printer resident font thus nice
+ // thus to prefer :-(
+ eDeviceT eDevice = this->IsDisplay() ? eDeviceDisplay : eDevicePrinter;
+
+ mpFactory = new AttributeProvider( eDevice );
+ mpFontList = new XlfdStorage();
+
+ int i, nFontCount;
+ const int nMaxCount = 64 * 1024 - 1;
+ Display *pDisplay = GetDisplay();
+ char **ppFontList = XListFonts(pDisplay, "-*", nMaxCount, &nFontCount);
+
+ //
+ // create a list of simple Xlfd font information
+ //
+
+ Xlfd *pXlfdList = (Xlfd*)malloc( nFontCount * sizeof(Xlfd) );
+ int nXlfdCount = 0;
+
+ for ( i = 0; i < nFontCount; i++ )
+ {
+ if ( pXlfdList[ nXlfdCount ].FromString(ppFontList[i], mpFactory) )
+ ++nXlfdCount;
+ }
+
+ XFreeFontNames( ppFontList );
+
+ // classification information is needed for sorting, classification
+ // of charset (i.e. iso8859-1 <-> ansi-1252) depends on wether the
+ // display points to a printer or to a real display. On a printer all
+ // iso8859-1 fonts are really capable of ansi-1252
+ mpFactory->AddClassification();
+ // add some pretty print description
+ mpFactory->AddAnnotation();
+ // misc feature checking
+ mpFactory->TagFeature();
+
+ // sort according to font style
+ qsort( pXlfdList, nXlfdCount, sizeof(Xlfd), XlfdCompare );
+
+ //
+ // create a font list with merged encoding information
+ //
+
+ BitmapXlfdStorage aBitmapList;
+ ScalableXlfd *pScalableFont = NULL;
+ PrinterFontXlfd *pPrinterFont = NULL;
+
+ int nFrom = 0;
+ for ( i = 0; i < nXlfdCount; i++ )
+ {
+ // exclude openlook glyph and cursor
+ Attribute *pAttr = mpFactory->RetrieveFamily(pXlfdList[i].mnFamily);
+ if ( pAttr->HasFeature( XLFD_FEATURE_OL_GLYPH
+ | XLFD_FEATURE_OL_CURSOR) )
+ {
+ continue;
+ }
+ // exclude fonts with unknown encoding
+ if ( pXlfdList[i].GetEncoding() == RTL_TEXTENCODING_DONTKNOW )
+ {
+ continue;
+ }
+
+ Bool bSameOutline = pXlfdList[i].SameFontoutline(pXlfdList + nFrom);
+ XlfdFonttype eType = pXlfdList[i].Fonttype();
+
+ // flush the old merged font list if the name doesn't match any more
+ if ( !bSameOutline )
+ {
+ mpFontList->Add( pScalableFont ); pScalableFont = NULL;
+ mpFontList->Add( pPrinterFont ); pPrinterFont = NULL;
+ mpFontList->Add( &aBitmapList ); aBitmapList.Reset();
+ }
+
+ // merge the font or generate a new one
+ switch( eType )
+ {
+ case eTypeScalable:
+
+ if ( pScalableFont == NULL )
+ pScalableFont = new ScalableXlfd;
+ pScalableFont->AddEncoding(pXlfdList + i);
+
+ break;
+
+ case eTypeBitmap:
+
+ aBitmapList.AddBitmapFont( pXlfdList + i );
+
+ break;
+
+ case eTypePrinterBuiltIn:
+ case eTypePrinterDownload:
+
+ if ( pPrinterFont == NULL )
+ pPrinterFont = new PrinterFontXlfd;
+ pPrinterFont->AddEncoding( pXlfdList + i );
+
+ break;
+
+ case eTypeScalableBitmap:
+ default:
+
+ break;
+ }
+
+ nFrom = i;
+ }
+
+ // flush the merged list into the global list
+ mpFontList->Add( pScalableFont );
+ mpFontList->Add( pPrinterFont );
+ mpFontList->Add( &aBitmapList );
+
+ // cleanup the list of simple font information
+ if ( pXlfdList != NULL )
+ free( pXlfdList );
+
+ return mpFontList;
+ }
+}
+
+// ---------------------------------------------------------------------------
+
+ExtendedFontStruct*
+SalDisplay::GetFont( ExtendedXlfd *pRequestedFont, int nPixelSize )
+{
+ if( !pFontCache_ )
+ {
+ mpCvtCache = new SalConverterCache;
+ pFontCache_ = new SalFontCache( 64, 64, 16 ); // ???
+ }
+ else
+ {
+ ExtendedFontStruct *pItem;
+ for ( pItem = pFontCache_->First();
+ pItem != NULL;
+ pItem = pFontCache_->Next() )
+ {
+ if ( pItem->Match(pRequestedFont, nPixelSize) )
+ {
+ if( pFontCache_->GetCurPos() )
+ {
+ pFontCache_->Remove( pItem );
+ pFontCache_->Insert( pItem, 0UL );
+ }
+ return pItem;
+ }
+ }
+ }
+
+ // before we expand the cache, we look for very old and unused items
+ if( pFontCache_->Count() >= 64 )
+ {
+ ExtendedFontStruct *pItem;
+ for ( pItem = pFontCache_->Last();
+ pItem != NULL;
+ pItem = pFontCache_->Prev() )
+ {
+ if( 1 == pItem->GetRefCount() )
+ {
+ pFontCache_->Remove( pItem );
+ pItem->ReleaseRef();
+
+ if( pFontCache_->Count() < 64 )
+ break;
+ }
+ }
+ }
+
+ ExtendedFontStruct *pItem = new ExtendedFontStruct( GetDisplay(),
+ nPixelSize, pRequestedFont, mpCvtCache );
+ pFontCache_->Insert( pItem, 0UL );
+ pItem->AddRef();
+
+ return pItem;
+}
+
+// ---------------------------------------------------------------------------
+
+void
+SalDisplay::DestroyFontCache()
+{
+ if( pFontCache_ )
+ {
+ ExtendedFontStruct *pItem = pFontCache_->First();
+ while( pItem )
+ {
+ delete pItem;
+ pItem = pFontCache_->Next();
+ }
+ delete pFontCache_;
+ }
+ if( mpFontList )
+ {
+ mpFontList->Dispose();
+ delete mpFontList;
+ }
+ if ( mpFactory )
+ {
+ delete mpFactory;
+ }
+ if ( mpCvtCache )
+ {
+ delete mpCvtCache;
+ }
+
+ pFontCache_ = (SalFontCache*)NULL;
+ mpFontList = (XlfdStorage*)NULL;
+ mpFactory = (AttributeProvider*)NULL;
+ mpCvtCache = (SalConverterCache*)NULL;
+}
+
+// ----------------------------------------------------------------------------
+//
+// SalGraphicsData
+//
+// ----------------------------------------------------------------------------
+
+GC
+SalGraphicsData::SelectFont()
+{
+ Display *pDisplay = GetXDisplay();
+
+ if( !pFontGC_ )
+ {
+ XGCValues values;
+ values.subwindow_mode = IncludeInferiors;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = True;
+ values.foreground = nTextPixel_;
+
+ pFontGC_ = XCreateGC( pDisplay, hDrawable_,
+ GCSubwindowMode | GCFillRule
+ | GCGraphicsExposures | GCForeground,
+ &values );
+ }
+
+ if( !bFontGC_ )
+ {
+ XSetForeground( pDisplay, pFontGC_, nTextPixel_ );
+ SetClipRegion( pFontGC_ );
+ bFontGC_ = TRUE;
+ }
+
+ return pFontGC_;
+}
+
+//--------------------------------------------------------------------------
+
+// Select the max size of a font, which is token for real
+// This routine is (and should be) called only once, the result should be
+// stored in some static variable
+
+static int
+GetMaxFontHeight()
+{
+ #define DEFAULT_MAXFONTHEIGHT 250
+
+ int nMaxFontHeight = 0;
+
+ char *FontHeight = getenv ("SAL_MAXFONTHEIGHT");
+ if (FontHeight)
+ nMaxFontHeight = atoi (FontHeight);
+
+ if (nMaxFontHeight <= 0)
+ nMaxFontHeight = DEFAULT_MAXFONTHEIGHT;
+
+ return nMaxFontHeight;
+}
+
+void
+SalGraphicsData::SetFont( const ImplFontSelectData *pEntry )
+{
+ bFontGC_ = FALSE;
+ xFont_ = NULL; // ->ReleaseRef()
+ aScale_ = Fraction( 1, 1 );
+ nFontOrientation_ = pEntry->mnOrientation;
+
+ if( pEntry->mpFontData && pEntry->mpFontData->mpSysData )
+ {
+ ExtendedXlfd *pSysFont = (ExtendedXlfd*)pEntry->mpFontData->mpSysData;
+ static int nMaxFontHeight = GetMaxFontHeight();
+
+ USHORT nH, nW;
+ if( bWindow_ )
+ {
+ // see BugId #44528# FontWork (-> #45038#) and as well Bug #47127#
+ if( pEntry->mnHeight > nMaxFontHeight )
+ nH = nMaxFontHeight;
+ else if( pEntry->mnHeight > 2 )
+ nH = pEntry->mnHeight;
+ else
+ nH = 2;
+ nW = 0; // pEntry->mnWidth;
+ }
+ else
+ {
+ nH = pEntry->mnHeight;
+ nW = pEntry->mnWidth;
+ }
+
+ xFont_ = GetDisplay()->GetFont( pSysFont, nH );
+ if( pEntry->mnHeight > nMaxFontHeight || pEntry->mnHeight < 2 )
+ aScale_ = Fraction( pEntry->mnHeight, nH );
+ }
+ else
+ {
+ #ifdef DEBUG
+ // XXX Fix me: provide a fallback for poor font installations
+ // we may be reach this if no font matches the GUI font
+ // MS Sans Serif;Geneva;Helv;WarpSans;Dialog;Lucida; ... */
+ fprintf( stderr, "SalGraphicsData::SetFont: Invalid Font Selection\n" );
+ #endif
+ }
+}
+
+//--------------------------------------------------------------------------
+
+static sal_Unicode
+SwapBytes( const sal_Unicode nIn )
+{
+ return ((nIn >> 8) & 0x00ff) | ((nIn << 8) & 0xff00);
+}
+
+
+// draw string in a specific multibyte encoding
+static void
+ConvertTextItem16( XTextItem16* pTextItem,
+ SalConverterCache* pCvt, rtl_TextEncoding nEncoding )
+{
+ if ( pTextItem && pTextItem->nchars > 0 )
+ {
+ // convert the string into the font encoding
+ sal_Size nSize;
+ sal_Size nBufferSize = pTextItem->nchars * 2;
+ sal_Char *pBuffer = (sal_Char*)alloca( nBufferSize );
+
+ nSize = ConvertStringUTF16( (sal_Unicode*)pTextItem->chars, pTextItem->nchars,
+ pBuffer, nBufferSize, pCvt->GetU2TConverter(nEncoding));
+
+ sal_Char *pTextChars = (sal_Char*)pTextItem->chars;
+ int n = 0, m = 0;
+
+ if ( nEncoding == RTL_TEXTENCODING_GB_2312
+ || nEncoding == RTL_TEXTENCODING_GBT_12345
+ || nEncoding == RTL_TEXTENCODING_GBK
+ || nEncoding == RTL_TEXTENCODING_BIG5 )
+ {
+ // GB and Big5 needs special treatment since chars can be single or
+ // double byte: encoding is
+ // [ 0x00 - 0x7f ] | [ 0x81 - 0xfe ] [ 0x40 - 0x7e 0x80 - 0xfe ]
+ while ( n < nSize )
+ {
+ if ( (unsigned char)pBuffer[ n ] < 0x80 )
+ {
+ pTextChars[ m++ ] = 0x0;
+ pTextChars[ m++ ] = pBuffer[ n++ ];
+ }
+ else
+ {
+ pTextChars[ m++ ] = pBuffer[ n++ ];
+ pTextChars[ m++ ] = pBuffer[ n++ ];
+ }
+ }
+ pTextItem->nchars = m / 2;
+ }
+ else
+ if ( pCvt->IsSingleByteEncoding(nEncoding) )
+ {
+ // Single Byte encoding has to be padded
+ while ( n < nSize )
+ {
+ pTextChars[ m++ ] = 0x0;
+ pTextChars[ m++ ] = pBuffer[ n++ ];
+ }
+ pTextItem->nchars = nSize;
+ }
+ else
+ {
+ while ( n < nSize )
+ {
+ pTextChars[ m++ ] = pBuffer[ n++ ];
+ }
+ pTextItem->nchars = nSize / 2;
+ }
+ }
+}
+
+// XXX this is a hack since XPrinter is not multibyte capable
+// XXX for printing this routine is called for each character
+void
+XPrinterDrawText16( Display* pDisplay, Drawable nDrawable, GC nGC,
+ int nX, int nY, int nAngle, XTextItem16 *pTextItem16, int nItem )
+{
+ // convert XTextItem16 to XTextItem
+ XTextItem *pTextItem = (XTextItem*)alloca( nItem * sizeof(XTextItem) );
+
+ for ( int nCurItem = 0; nCurItem < nItem; nCurItem++ )
+ {
+ int nChars = pTextItem16[ nCurItem ].nchars;
+ char* pDstCharPtr = (char*)alloca( nChars * sizeof(char) );
+ XChar2b* pSrcCharPtr = pTextItem16[ nCurItem ].chars;
+
+ pTextItem[ nCurItem ].chars = pDstCharPtr;
+ pTextItem[ nCurItem ].nchars = nChars;
+ pTextItem[ nCurItem ].delta = pTextItem16[ nCurItem ].delta;
+ pTextItem[ nCurItem ].font = pTextItem16[ nCurItem ].font;
+
+ for ( int nCurChar = 0;
+ nCurChar < nChars;
+ nCurChar++, pDstCharPtr++, pSrcCharPtr++ )
+ {
+ *pDstCharPtr = (char)pSrcCharPtr->byte2;
+ }
+ }
+
+ if ( nAngle != 0 )
+ {
+ for ( int nCurItem = 0; nCurItem < nItem; nCurItem++ )
+ {
+ // XXX FIXME this is broken, because nX and nY is not sufficiently updated
+ XSetFont( pDisplay, nGC, pTextItem[ nItem ].font );
+ if ( XSalCanDrawRotString(pDisplay, nGC) )
+ {
+ XSalDrawRotString( pDisplay, nDrawable, nGC, nX, nY,
+ pTextItem[ nCurItem ].chars, pTextItem[ nCurItem ].nchars, nAngle );
+ }
+ else
+ {
+ XDrawString( pDisplay, nDrawable, nGC, nX, nY,
+ pTextItem[ nCurItem ].chars, pTextItem[ nCurItem ].nchars );
+ }
+ }
+ }
+ else
+ {
+ XDrawText( pDisplay, nDrawable, nGC, nX, nY, pTextItem, nItem );
+ }
+}
+
+// draw string in one of the fonts / encodings that are available in the
+// extended font
+static void
+DrawString( Display *pDisplay, Drawable nDrawable, GC nGC,
+ int nX, int nY, const sal_Unicode *pStr, int nLength, int nAngle,
+ SalConverterCache *pCvt, ExtendedFontStruct *pFont )
+{
+ // sanity check
+ if ( pFont == NULL || nLength == 0 )
+ return;
+
+ rtl_TextEncoding nAsciiEnc = pFont->GetAsciiEncoding();
+
+ if ( nAsciiEnc == RTL_TEXTENCODING_UNICODE )
+ {
+ // plain Unicode, can handle all chars and can be handled straight forward
+ XFontStruct* pFontStruct = pFont->GetFontStruct( nAsciiEnc );
+
+ if ( pFontStruct == NULL )
+ return;
+
+ XSetFont( pDisplay, nGC, pFontStruct->fid );
+
+ #ifdef OSL_LITENDIAN
+ sal_Unicode *pBuffer = (sal_Unicode*)alloca( nLength * sizeof(sal_Unicode) );
+ for ( int i = 0; i < nLength; i++ )
+ pBuffer[ i ] = SwapBytes(pStr[ i ]) ;
+ #else
+ sal_Unicode *pBuffer = const_cast<sal_Unicode*>(pStr);
+ #endif
+
+ XDrawString16( pDisplay, nDrawable, nGC, nX, nY, (XChar2b*)pBuffer, nLength );
+ }
+ else
+ {
+ // convert the string to a XTextItem16 with each item chars having the
+ // encoding matching the font of fontid
+ XTextItem16 *pTextItem = (XTextItem16*)alloca( nLength * sizeof(XTextItem16) );
+ XChar2b *pMBChar = (XChar2b*)alloca( nLength * sizeof(XChar2b) );
+ memcpy( pMBChar, pStr, nLength * sizeof(XChar2b) );
+
+ rtl_TextEncoding nEncoding = nAsciiEnc;
+ XFontStruct* pFontStruct = pFont->GetFontStruct( nEncoding );
+
+ if ( pFontStruct == NULL )
+ return;
+
+ for ( int nChar = 0, nItem = -1; nChar < nLength; nChar++ )
+ {
+ rtl_TextEncoding nOldEnc = nEncoding;
+ pFont->GetFontStruct( pStr[nChar], &nEncoding, &pFontStruct, pCvt );
+
+ if ( (nItem != -1) && (pFontStruct->fid == pTextItem[ nItem ].font) )
+ {
+ pTextItem[ nItem ].nchars += 1;
+ }
+ else
+ {
+ if ( nItem != -1 )
+ ConvertTextItem16( &pTextItem[ nItem ], pCvt, nOldEnc );
+
+ ++nItem;
+
+ pTextItem[ nItem ].chars = pMBChar + nChar;
+ pTextItem[ nItem ].delta = 0;
+ pTextItem[ nItem ].font = pFontStruct->fid;
+ pTextItem[ nItem ].nchars = 1;
+ }
+ }
+ ConvertTextItem16( &pTextItem[ nItem ], pCvt, nEncoding );
+ ++nItem;
+
+ if ( XSalIsDisplay( pDisplay ) )
+ XDrawText16( pDisplay, nDrawable, nGC, nX, nY, pTextItem, nItem );
+ else
+ XPrinterDrawText16( pDisplay, nDrawable, nGC, nX, nY, nAngle,
+ pTextItem, nItem );
+ }
+}
+
+//--------------------------------------------------------------------------
+
+void
+SalGraphicsData::DrawText( long nX, long nY,
+ const sal_Unicode *pStr, USHORT nLen )
+{
+#ifndef PRINTER_DUMMY
+ if( bPrinter_ )
+ FaxPhoneComment( GetXDisplay(), pStr, nLen );
+#endif
+
+ #ifdef __notdef__
+ // XXX Fix me this part is not unicode / multibyte aware
+
+ // Bug: #45670#
+ // some monospace ISO8859-1 fonts have a hole between chars 128 and 159
+ // some applications assume these characters have also the default width
+ if( ! bPrinter_ &&
+ PITCH_FIXED == xFont_->GetFont()->mePitch &&
+ nLen > 1 )
+ {
+ XFontStruct *pXFS = GetFontInfo();
+ long nWidth = xFont_->GetDim()->GetWidth();
+
+ if( xFont_->GetFixedWidth() != nWidth
+ || xFont_->GetDefaultWidth() != nWidth )
+ {
+ unsigned int min_char = pXFS->min_char_or_byte2;
+ unsigned int max_char = pXFS->max_char_or_byte2;
+ XCharStruct *pXCS = pXFS->per_char - min_char;
+
+ for( USHORT i = 0; i < nLen-1; i++ )
+ {
+ unsigned int c = ((unsigned char*)pStr)[i];
+
+ long nW = c < min_char || c > max_char || ! pXFS->per_char
+ ? xFont_->GetDefaultWidth()
+ : pXCS[c].width;
+
+ if( nW != nWidth )
+ {
+ long *pDXAry = new long[nLen];
+
+ for( i = 0; i < nLen; i++ )
+ pDXAry[i] = nWidth * (i+1);
+
+ DrawText( nX, nY, pStr, nLen, pDXAry );
+
+ delete pDXAry;
+
+ return;
+ }
+ }
+ }
+ }
+
+ #endif /* __notdef__ */
+
+ Display *pDisplay = GetXDisplay();
+ SalConverterCache *pCvt = GetDisplay()->GetConverter();
+ GC pGC = SelectFont();
+
+ DrawString( pDisplay, hDrawable_, pGC, nX, nY,
+ pStr, nLen, nFontOrientation_ * 64 / 10, pCvt, xFont_ );
+}
+
+void
+SalGraphics::DrawText( long nX, long nY, const xub_Unicode* pStr, USHORT nLen )
+{
+ maGraphicsData.DrawText( nX, nY, pStr, nLen );
+}
+
+//--------------------------------------------------------------------------
+
+static BOOL
+CheckNoNegativeCoordinateWorkaround()
+{
+ /* Motivation: one of our clients uses a Solaris 2.4 X86 system with an
+ XServer for the Matrox Mystique graphics card. This board/server
+ sometimes does not draw Text with negative x-coordinates into a
+ virtual device (for unknown reasons). A stock X-server just clips the
+ part in the negative area. */
+ static int nCheck = -2;
+ if( nCheck == -2 )
+ {
+ char* pCmp = getenv( "SAL_NO_NEGATIVE_TEXT_OFFSET" );
+ if( pCmp && ! strncasecmp( pCmp, "true", 4 ) )
+ nCheck = 1;
+ else
+ nCheck = 0;
+ }
+ return nCheck ? TRUE : FALSE;
+}
+
+void
+SalGraphicsData::DrawText(
+ long nX, long nY,
+ const sal_Unicode* pStr, USHORT nLen, const long* pDXAry )
+{
+ #ifndef PRINTER_DUMMY
+ if( bPrinter_ )
+ FaxPhoneComment( GetXDisplay(), pStr, nLen );
+ #endif
+ GC pGC = SelectFont();
+
+ // workaround for problems with negative coordinates
+ long* pTmpAry = NULL;
+ if( nX < 0 && CheckNoNegativeCoordinateWorkaround() )
+ {
+ long nOldX = nX;
+ while( nX < 0 )
+ {
+ nX = nOldX + *pDXAry;
+ pStr++, pDXAry++, nLen--;
+ if( nLen < 1 )
+ return;
+ }
+ pTmpAry = new long[ nLen ];
+ for( int q = 0; q < nLen-1; q++ )
+ pTmpAry[q] = pDXAry[q] - ( nX - nOldX );
+ pDXAry = pTmpAry;
+ }
+
+ // draw every single character
+ SalConverterCache *pCvt = GetDisplay()->GetConverter();
+ int angle = nFontOrientation_ * 64 / 10;
+ Polygon aPolygon(1);
+ Point aOrigin( nX, nY );
+ Point aCharPos;
+
+ DrawString( GetXDisplay(), hDrawable_, pGC,
+ aOrigin.X(), aOrigin.Y(), pStr, 1, angle, pCvt, xFont_ );
+
+ for( int i = 1; i < nLen ; i++ )
+ {
+ aCharPos = Point( aOrigin.X() + pDXAry[ i - 1 ], aOrigin.Y() );
+ aPolygon.SetPoint( aCharPos, 0 );
+ aPolygon.Rotate( aOrigin, nFontOrientation_ );
+ aCharPos = aPolygon.GetPoint( 0 );
+
+ DrawString( GetXDisplay(), hDrawable_, pGC,
+ aCharPos.X(), aCharPos.Y(), pStr + i, 1, angle, pCvt, xFont_ );
+ }
+
+ if( pTmpAry )
+ delete pTmpAry;
+}
+
+// ----------------------------------------------------------------------------
+//
+// SalGraphics
+//
+// ----------------------------------------------------------------------------
+
+USHORT
+SalGraphics::SetFont( ImplFontSelectData *pEntry )
+{
+ maGraphicsData.SetFont( pEntry );
+ return _IsPrinter() ? SAL_SETFONT_USEDRAWTEXTARRAY : 0;
+}
+
+// ----------------------------------------------------------------------------
+
+void
+SalGraphics::DrawTextArray( long nX, long nY,
+ const xub_Unicode *pStr, USHORT nLen, const long *pDXAry )
+{
+ maGraphicsData.DrawText( nX, nY, pStr, nLen, pDXAry );
+}
+
+// ----------------------------------------------------------------------------
+
+void
+SalGraphics::SetTextColor( SalColor nSalColor )
+{
+ if( _GetTextColor() != nSalColor )
+ {
+ _GetTextColor() = nSalColor;
+ _GetTextPixel() = _GetPixel( nSalColor );
+ _IsFontGC() = FALSE;
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+void
+SalGraphics::GetDevFontList( ImplDevFontList *pList )
+{
+ XlfdStorage* pFonts = _GetDisplay()->GetXlfdList();
+
+ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ )
+ {
+ ImplFontData *pFontData = new ImplFontData;
+ pFonts->Get(nIdx)->ToImplFontData( pFontData );
+ pList->Add( pFontData );
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+inline long
+sal_DivideNeg( long n1, long n2 )
+{
+ return ( n1 < 0 ) ? (n1 - n2 / 2) / n2 : (n1 + n2 / 2) / n2;
+}
+
+void
+SalGraphics::GetFontMetric( ImplFontMetricData *pMetric )
+{
+ ExtendedFontStruct* pFont = maGraphicsData.xFont_;
+
+ if ( pFont != NULL )
+ {
+ pFont->ToImplFontMetricData( pMetric );
+
+ if( XSalCanDrawRotString( maGraphicsData.GetXDisplay(), None ) )
+ pMetric->mnOrientation = maGraphicsData.nFontOrientation_;
+
+ long n;
+
+ n = maGraphicsData.aScale_.GetNumerator();
+ if( n != 1 )
+ {
+ pMetric->mnWidth *= n;
+ pMetric->mnAscent *= n;
+ pMetric->mnDescent *= n;
+ pMetric->mnLeading *= n;
+ pMetric->mnSlant *= n;
+ }
+
+ n = maGraphicsData.aScale_.GetDenominator();
+ if( n != 1 )
+ {
+ pMetric->mnWidth = Divide( pMetric->mnWidth, n );
+ pMetric->mnAscent = sal_DivideNeg( pMetric->mnAscent, n );
+ pMetric->mnDescent = sal_DivideNeg( pMetric->mnDescent, n );
+ pMetric->mnLeading = sal_DivideNeg( pMetric->mnLeading, n );
+ pMetric->mnSlant = sal_DivideNeg( pMetric->mnSlant, n );
+ }
+ }
+}
+
+// ---------------------------------------------------------------------------
+
+static long
+InitializeWidthArray( long *pWidthArray, sal_Size nItems, int nValue = 0 )
+{
+ const long nPrecision = 1;
+
+ for ( int i = 0; i < nItems; i++, pWidthArray++ )
+ *pWidthArray = nValue;
+
+ return nPrecision;
+}
+
+long
+SalGraphics::GetCharWidth( USHORT nChar1, USHORT nChar2, long *pWidthAry )
+{
+ // return the precision of the calculated charwidth, e.g. 1000 = 3 digits
+ // defaultet to 1 for now
+ const long nPrecision = 1;
+ int nRequestedWidth = nChar2 - nChar1 + 1;
+ int nCharWidth;
+
+ // XXX sanity check, this may happen if no font at all is installed
+ // or no system font matches the requirements for the user interface
+ if ( maGraphicsData.xFont_ == NULL )
+ return InitializeWidthArray( pWidthAry, nRequestedWidth, 12 );
+
+ // the font should know it's metrics best
+ SalDisplay *pSalDisplay = maGraphicsData.GetDisplay();
+
+ nCharWidth = maGraphicsData.xFont_->GetCharWidth(
+ pSalDisplay->GetConverter(), nChar1, nChar2, pWidthAry );
+
+ // XXX sanity check, this may happen if the font cannot be loaded/queried
+ // either because of a garbled fontpath or because of invalid fontfile
+ if ( nCharWidth != nRequestedWidth )
+ InitializeWidthArray( pWidthAry + nCharWidth,
+ nRequestedWidth - nCharWidth );
+
+ // handle internal scaling
+ const long nNumerator = maGraphicsData.aScale_.GetNumerator();
+ const long nDenominator = maGraphicsData.aScale_.GetDenominator();
+ long *pPtr;
+ sal_Unicode nChar;
+
+ if ( nNumerator != 1 )
+ for( pPtr = pWidthAry, nChar = nChar1; nChar <= nChar2; nChar++, pPtr++)
+ *pPtr *= nNumerator;
+ if ( nDenominator != 1 )
+ for( pPtr = pWidthAry, nChar = nChar1; nChar <= nChar2; nChar++, pPtr++)
+ *pPtr = Divide( *pPtr, nDenominator );
+
+ // return
+ return nPrecision;
+}
+
+// ---------------------------------------------------------------------------
+
+extern unsigned char TranslateCharName( char* );
+
+ULONG
+SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+{
+ if( ! _IsPrinter() )
+ return 0;
+
+ // get pair kerning table ( internal data from xprinter )
+ int i, nCurPair=0;
+
+ // XXX Fix me, improve this to be multi encoding aware: merge kern
+ // pair list for all encodings available in the xfont
+ rtl_TextEncoding nEncoding = maGraphicsData.xFont_->GetAsciiEncoding();
+ XFontStruct *pXFS = maGraphicsData.xFont_->GetFontStruct( nEncoding );
+ XExtData *pXES = pXFS->ext_data;
+
+ for( i = 0; pXES && i < 2; i++, pXES = pXES->next );
+ if( i < 2 )
+ return 0;
+ XpPairKernData* pXpPKD = (XpPairKernData*)(pXES->private_data);
+ PairKernData* pPKD = pXpPKD->pkd;
+
+ for( i = 0, nCurPair=0; i < pXpPKD->numOfPairs; i++ )
+ {
+ unsigned char c1 = TranslateCharName( pPKD[i].name1 );
+ unsigned char c2 = TranslateCharName( pPKD[i].name2 );
+ if( c1 && c2 )
+ {
+ if( pKernPairs && nCurPair < nPairs )
+ {
+ pKernPairs[ nCurPair ].mnChar1 = c1;
+ pKernPairs[ nCurPair ].mnChar2 = c2;
+ pKernPairs[ nCurPair ].mnKern =
+ (long)(pPKD[i].xamt * pXpPKD->pointsize / 1000 );
+ }
+ nCurPair++;
+ }
+ }
+
+ return nCurPair;
+}
+
+// ---------------------------------------------------------------------------
+
+BOOL
+SalGraphics::GetGlyphBoundRect( xub_Unicode c,
+ long *pX, long *pY, long *pDX, long *pDY )
+{
+ return FALSE;
+}
+
+// ---------------------------------------------------------------------------
+
+ULONG
+SalGraphics::GetGlyphOutline( xub_Unicode c,
+ USHORT **ppPolySizes, SalPoint **ppPoints, BYTE **ppFlags )
+{
+ return 0;
+}
+
diff --git a/vcl/unx/source/gdi/salogl.cxx b/vcl/unx/source/gdi/salogl.cxx
new file mode 100644
index 000000000000..ef2566788549
--- /dev/null
+++ b/vcl/unx/source/gdi/salogl.cxx
@@ -0,0 +1,393 @@
+/*************************************************************************
+ *
+ * $RCSfile: salogl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALOGL_CXX
+
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+
+#ifndef _SV_SALOGL_HXX
+#include <salogl.hxx>
+#endif
+
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+
+// ------------
+// - Lib-Name -
+// ------------
+
+#define OGL_LIBNAME "libGL.so"
+// ----------
+// - Macros -
+// ----------
+
+// NETBSD has neither RTLD_GLOBAL nor RTLD_NOW
+#ifdef NETBSD
+#define DLOPEN_MODE 0
+#else
+#define DLOPEN_MODE (RTLD_NOW | RTLD_GLOBAL)
+#endif
+
+
+// -----------------
+// - Statics init. -
+// -----------------
+
+// Members
+GLXContext SalOpenGL::maGLXContext = 0;
+Display* SalOpenGL::mpDisplay = 0;
+XVisualInfo* SalOpenGL::mpVisualInfo = 0;
+BOOL SalOpenGL::mbHaveGLVisual = FALSE;
+
+void * SalOpenGL::mpGLLib = 0;
+ULONG SalOpenGL::mnOGLState = OGL_STATE_UNLOADED;
+
+GLXContext (*SalOpenGL::pCreateContext)( Display *, XVisualInfo *, GLXContext, Bool ) = 0;
+void (*SalOpenGL::pDestroyContext)( Display *, GLXContext ) = 0;
+GLXContext (*SalOpenGL::pGetCurrentContext)( ) = 0;
+Bool (*SalOpenGL::pMakeCurrent)( Display *, GLXDrawable, GLXContext ) = 0;
+void (*SalOpenGL::pSwapBuffers)( Display*, GLXDrawable ) = 0;
+int (*SalOpenGL::pGetConfig)( Display*, XVisualInfo*, int, int* ) = 0;
+void (*SalOpenGL::pFlush)() = 0;
+
+// -------------
+// - SalOpenGL -
+// -------------
+
+SalOpenGL::SalOpenGL( SalGraphics* pGraphics )
+{
+ mpDisplay = pGraphics->maGraphicsData.GetXDisplay();
+ mpVisualInfo = pGraphics->maGraphicsData.GetDisplay()->GetVisual();
+ maDrawable = pGraphics->maGraphicsData.GetDrawable();
+}
+
+// ------------------------------------------------------------------------
+
+SalOpenGL::~SalOpenGL()
+{
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SalOpenGL::Create()
+{
+ if( OGL_STATE_UNLOADED == mnOGLState )
+ {
+ BOOL bHasGLX = FALSE;
+ char **ppExtensions;
+ int nExtensions;
+
+ if( *DisplayString( mpDisplay ) == ':' ||
+ ! strncmp( DisplayString( mpDisplay ), "localhost:", 10 )
+ )
+ {
+ // GLX only on local displays due to strange problems
+ // with remote GLX
+ ppExtensions = XListExtensions( mpDisplay, &nExtensions );
+ for( int i=0; i < nExtensions; i++ )
+ {
+ if( ! strncmp( "GLX", ppExtensions[ i ], 3 ) )
+ {
+ bHasGLX = TRUE;
+ break;
+ }
+ }
+ XFreeExtensionList( ppExtensions );
+#ifdef DEBUG
+ if( ! bHasGLX )
+ fprintf( stderr, "XServer does not support GLX extension\n" );
+#endif
+ }
+ if( bHasGLX && mpVisualInfo->c_class == TrueColor && ImplInit() )
+ {
+ int nDoubleBuffer = 0;
+ int nHaveGL = 0;
+ pGetConfig( mpDisplay, mpVisualInfo,
+ GLX_USE_GL, &nHaveGL );
+ pGetConfig( mpDisplay, mpVisualInfo,
+ GLX_DOUBLEBUFFER, &nDoubleBuffer );
+ if( nHaveGL && ! nDoubleBuffer )
+ {
+ SalDisplay* pSalDisplay = GetSalData()->GetDefDisp();
+ BOOL bPreviousState =
+ pSalDisplay->GetXLib()->GetIgnoreXErrors();
+ pSalDisplay->GetXLib()->SetIgnoreXErrors( TRUE );
+ mbHaveGLVisual = TRUE;
+
+ maGLXContext = pCreateContext( mpDisplay, mpVisualInfo, 0, True );
+ if( pSalDisplay->GetXLib()->WasXError() )
+ mbHaveGLVisual = FALSE;
+ else
+ pMakeCurrent( mpDisplay, maDrawable, maGLXContext );
+ if( pSalDisplay->GetXLib()->WasXError() )
+ mbHaveGLVisual = FALSE;
+ pSalDisplay->GetXLib()->SetIgnoreXErrors( bPreviousState );
+
+ if( mbHaveGLVisual )
+ mnOGLState = OGL_STATE_VALID;
+ else
+ maGLXContext = None;
+ }
+ }
+ if( mnOGLState != OGL_STATE_VALID )
+ {
+ ImplFreeLib();
+ mnOGLState = OGL_STATE_INVALID;
+ }
+#if defined DEBUG
+ if( mnOGLState == OGL_STATE_VALID )
+ fprintf( stderr, "Using GLX on visual id %x.\n", mpVisualInfo->visualid );
+ else
+ fprintf( stderr, "Not using GLX.\n" );
+#endif
+ }
+
+ return mnOGLState == OGL_STATE_VALID ? TRUE : FALSE;
+}
+
+// ------------------------------------------------------------------------
+
+void SalOpenGL::Release()
+{
+ ImplFreeLib();
+}
+
+// ------------------------------------------------------------------------
+
+void* SalOpenGL::GetOGLFnc( const String& rFncName )
+{
+ if( mpGLLib )
+ {
+ return dlsym( mpGLLib, ByteString( rFncName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ }
+ return NULL;
+}
+
+void* SalOpenGL::GetOGLFnc( char *pFncName )
+{
+ if( mpGLLib )
+ {
+ return dlsym( mpGLLib, pFncName );
+ }
+ return NULL;
+}
+
+// ------------------------------------------------------------------------
+
+void SalOpenGL::OGLEntry( SalGraphics* pGraphics )
+{
+ GLXDrawable aDrawable = pGraphics->maGraphicsData.GetDrawable();
+ if( aDrawable != maDrawable )
+ {
+ maDrawable = aDrawable;
+ pMakeCurrent( mpDisplay, maDrawable, maGLXContext );
+ }
+}
+
+// ------------------------------------------------------------------------
+
+void SalOpenGL::OGLExit( SalGraphics* pGraphics )
+{
+}
+
+// ------------------------------------------------------------------------
+
+void SalOpenGL::ImplFreeLib()
+{
+ if( mpGLLib )
+ {
+ if( maGLXContext && pDestroyContext )
+ pDestroyContext( mpDisplay, maGLXContext );
+ dlclose( mpGLLib );
+
+ mpGLLib = 0;
+ pCreateContext = 0;
+ pDestroyContext = 0;
+ pGetCurrentContext = 0;
+ pMakeCurrent = 0;
+ pSwapBuffers = 0;
+ pGetConfig = 0;
+ }
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SalOpenGL::ImplInit()
+{
+ if( ! mpGLLib )
+ {
+ ByteString sNoGL( getenv( "SAL_NOOPENGL" ) );
+ if( sNoGL.ToLowerAscii() == "true" ) return FALSE;
+ mpGLLib = dlopen( OGL_LIBNAME, DLOPEN_MODE );
+ }
+ if( ! mpGLLib )
+ {
+#ifdef DEBUG
+ fprintf( stderr, OGL_LIBNAME "could not be opened: %s\n", dlerror() );
+#endif
+ return FALSE;
+ }
+
+ // Internal use
+ pCreateContext = (GLXContext(*)(Display*,XVisualInfo*,GLXContext,Bool ))
+ GetOGLFnc( "glXCreateContext" );
+ pDestroyContext = (void(*)(Display*,GLXContext))
+ GetOGLFnc( "glXDestroyContext" );
+ pGetCurrentContext = (GLXContext(*)())
+ GetOGLFnc( "glXGetCurrentContext" );
+ pMakeCurrent = (Bool(*)(Display*,GLXDrawable,GLXContext))
+ GetOGLFnc( "glXMakeCurrent" );
+ pSwapBuffers=(void(*)(Display*, GLXDrawable))
+ GetOGLFnc( "glXSwapBuffers" );
+ pGetConfig = (int(*)(Display*, XVisualInfo*, int, int* ))
+ GetOGLFnc( "glXGetConfig" );
+ pFlush = (void(*)())
+ GetOGLFnc( "glFlush" );
+
+ BOOL bRet = pCreateContext && pDestroyContext && pGetCurrentContext && pMakeCurrent && pSwapBuffers && pGetConfig ? TRUE : FALSE;
+
+#ifdef DEBUG
+ if( ! bRet )
+ fprintf( stderr, "could not find all needed symbols in " OGL_LIBNAME "\n" );
+#endif
+
+ return bRet;
+}
+
+void SalOpenGL::StartScene( SalGraphics* pGraphics )
+{
+ // flush pending operations which otherwise might be drawn
+ // at the wrong time
+ XSync( mpDisplay, False );
+}
+
+void SalOpenGL::StopScene()
+{
+ if( maDrawable )
+ {
+ pSwapBuffers( mpDisplay, maDrawable );
+ pFlush();
+ }
+}
+
+void SalOpenGL::MakeVisualWeights( Display* pDisplay,
+ XVisualInfo* pInfos,
+ int *pWeights,
+ int nVisuals )
+{
+ BOOL bHasGLX = FALSE;
+ char **ppExtensions;
+ int nExtensions,i ;
+
+ // GLX only on local displays due to strange problems
+ // with remote GLX
+ if( ! ( *DisplayString( pDisplay ) == ':' ||
+ !strncmp( DisplayString( pDisplay ), "localhost:", 10 )
+ ) )
+ return;
+
+ ppExtensions = XListExtensions( pDisplay, &nExtensions );
+ for( i=0; i < nExtensions; i++ )
+ {
+ if( ! strncmp( "GLX", ppExtensions[ i ], 3 ) )
+ {
+ bHasGLX = TRUE;
+ break;
+ }
+ }
+ XFreeExtensionList( ppExtensions );
+ if( ! bHasGLX )
+ return;
+
+ if( ! ImplInit() )
+ {
+ ImplFreeLib();
+ return;
+ }
+
+ for( i = 0; i < nVisuals; i++ )
+ {
+ int nDoubleBuffer = 0;
+ int nHaveGL = 0;
+ if( pInfos[i].c_class == TrueColor )
+ {
+ pGetConfig( pDisplay, &pInfos[ i ], GLX_USE_GL, &nHaveGL );
+ pGetConfig( pDisplay, &pInfos[ i ], GLX_DOUBLEBUFFER, &nDoubleBuffer );
+ if( nHaveGL && ! nDoubleBuffer )
+ {
+ mbHaveGLVisual = TRUE;
+ pWeights[ i ] += 65536;
+ }
+ }
+ }
+}
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
new file mode 100644
index 000000000000..6c11ea419bcd
--- /dev/null
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * $RCSfile: salvd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALVD_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <salunx.h>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef _SV_SALVD_HXX
+#include <salvd.hxx>
+#endif
+
+// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+SalVirtualDevice* SalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
+ long nDX, long nDY,
+ USHORT nBitCount )
+{
+ SalVirtualDevice *pVDev = new SalVirtualDevice();
+ if( !nBitCount && pGraphics )
+ nBitCount = pGraphics->GetBitCount();
+ if( !pVDev->maVirDevData.Init( pGraphics->maGraphicsData.GetDisplay(),
+ nDX, nDY, nBitCount ) )
+ {
+ delete pVDev;
+ return NULL;
+ }
+
+ pVDev->maVirDevData.InitGraphics( pVDev, pGraphics );
+ return pVDev;
+}
+
+final void SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
+{ delete pDevice; }
+
+// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final void SalGraphicsData::Init( SalVirtualDevice *pDevice,
+ SalGraphics *pGraphics )
+{
+ SalDisplay *pDisplay = pDevice->maVirDevData.GetDisplay();
+
+ int nVisualDepth = pDisplay->GetColormap().GetVisual()->GetDepth();
+ int nDeviceDepth = pDevice->maVirDevData.GetDepth();
+
+ if( nDeviceDepth == nVisualDepth )
+ xColormap_ = &pDisplay->GetColormap();
+ else
+ if( nDeviceDepth == 1 )
+ xColormap_ = new SalColormap();
+
+ hDrawable_ = pDevice->maVirDevData.GetDrawable();
+
+ bWindow_ = pDisplay->IsDisplay();
+ bVirDev_ = TRUE;
+
+ nPenPixel_ = GetPixel( nPenColor_ );
+ nTextPixel_ = GetPixel( nTextColor_ );
+ nBrushPixel_ = GetPixel( nBrushColor_ );
+}
+
+// -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final BOOL SalVirDevData::Init( SalDisplay *pDisplay,
+ long nDX, long nDY,
+ USHORT nBitCount )
+{
+ pDisplay_ = pDisplay;
+ pGraphics_ = new SalGraphics();
+ nDX_ = nDX;
+ nDY_ = nDY;
+ nDepth_ = nBitCount;
+
+ hDrawable_ = XCreatePixmap( GetXDisplay(),
+ pDisplay_->GetDrawable(),
+ nDX_, nDY_,
+ GetDepth() );
+
+ return hDrawable_ != None ? TRUE : FALSE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final inline SalVirDevData::SalVirDevData()
+{
+ pDisplay_ = (SalDisplay*)ILLEGAL_POINTER;
+ pGraphics_ = NULL;
+ hDrawable_ = None;
+ nDX_ = 0;
+ nDY_ = 0;
+ nDepth_ = 0;
+ bGraphics_ = FALSE;
+}
+
+final SalVirtualDevice::SalVirtualDevice() {}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+beta inline SalVirDevData::~SalVirDevData()
+{
+ if( pGraphics_ )
+ {
+ pGraphics_->maGraphicsData.DeInit();
+ delete pGraphics_;
+ }
+
+ if( GetDrawable() )
+ XFreePixmap( GetXDisplay(), GetDrawable() );
+}
+
+final SalVirtualDevice::~SalVirtualDevice()
+{}
+
+// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#define _GetDrawable() maVirDevData.GetDrawable()
+#define _GetDisplay() maVirDevData.GetDisplay()
+#define _GetXDisplay() maVirDevData.GetXDisplay()
+#define _GetDepth() maVirDevData.nDepth_
+
+// -=-= SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+final SalGraphics* SalVirtualDevice::GetGraphics()
+{
+ if( maVirDevData.bGraphics_ )
+ return NULL;
+
+ if( maVirDevData.pGraphics_ )
+ maVirDevData.bGraphics_ = TRUE;
+
+ return maVirDevData.pGraphics_;
+}
+
+final void SalVirtualDevice::ReleaseGraphics( SalGraphics* )
+{ maVirDevData.bGraphics_ = FALSE; }
+
+final BOOL SalVirtualDevice::SetSize( long nDX, long nDY )
+{
+ if( !nDX ) nDX = 1;
+ if( !nDY ) nDY = 1;
+
+ Pixmap h = XCreatePixmap( _GetXDisplay(),
+ maVirDevData.pDisplay_->GetDrawable(),
+ nDX, nDY, _GetDepth() );
+
+ if( !h )
+ {
+ if( !_GetDrawable() )
+ {
+ maVirDevData.hDrawable_ = XCreatePixmap( _GetXDisplay(),
+ maVirDevData.pDisplay_->GetDrawable(),
+ 1, 1, _GetDepth() );
+ maVirDevData.nDX_ = 1;
+ maVirDevData.nDY_ = 1;
+ }
+ return FALSE;
+ }
+
+ if( _GetDrawable() )
+ XFreePixmap( _GetXDisplay(), _GetDrawable() );
+ maVirDevData.hDrawable_ = h;
+
+ maVirDevData.nDX_ = nDX;
+ maVirDevData.nDY_ = nDY;
+
+ if( maVirDevData.pGraphics_ )
+ maVirDevData.InitGraphics( this, maVirDevData.pGraphics_ );
+
+ return TRUE;
+}
+
diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx
new file mode 100644
index 000000000000..edf1f02f4cfc
--- /dev/null
+++ b/vcl/unx/source/gdi/xfont.cxx
@@ -0,0 +1,559 @@
+/*************************************************************************
+ *
+ * $RCSfile: xfont.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <salunx.h>
+
+#ifndef EXTENDED_FONTSTRUCT_HXX
+#include "xfont.hxx"
+#endif
+#ifndef XLFD_EXTENDED_HXX
+#include "xlfd_extd.hxx"
+#endif
+#ifndef SAL_CONVERTER_CACHE_HXX_
+#include "salcvt.hxx"
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _SV_OUTFONT_HXX
+#include <outfont.hxx>
+#endif
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+ExtendedFontStruct::ExtendedFontStruct( Display* pDisplay,
+ unsigned short nPixelSize, ExtendedXlfd* pXlfd,
+ SalConverterCache* pCvt ) :
+ mpDisplay( pDisplay ),
+ mnPixelSize( nPixelSize ),
+ mpXlfd( pXlfd )
+{
+ // member functions rely on zero initialized pointer for checking of
+ // already loaded fonts
+ mpXFontStruct = (XFontStruct**)calloc( mpXlfd->NumEncodings(),
+ sizeof(XFontStruct*) );
+ mnDefaultWidth = GetDefaultWidth( pCvt );
+}
+
+ExtendedFontStruct::~ExtendedFontStruct()
+{
+ for ( int nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ )
+ {
+ if ( mpXFontStruct[nIdx] != NULL )
+ XFreeFont( mpDisplay, mpXFontStruct[nIdx] );
+ }
+}
+
+rtl_TextEncoding
+ExtendedFontStruct::GetAsciiEncoding( int *pAsciiRange ) const
+{
+ return mpXlfd->GetAsciiEncoding( pAsciiRange );
+}
+
+int
+ExtendedFontStruct::LoadEncoding( rtl_TextEncoding nEncoding )
+{
+ int nIdx = mpXlfd->GetEncodingIdx( nEncoding );
+ if ( (nIdx < 0) || (mpXFontStruct[ nIdx ] != NULL) )
+ return nIdx;
+
+ ByteString aFontName;
+ mpXlfd->ToString( aFontName, mnPixelSize, nEncoding );
+
+ mpXFontStruct[ nIdx ] = XLoadQueryFont( mpDisplay, aFontName.GetBuffer() );
+ if ( (mpXFontStruct[nIdx] != NULL) && (mpXFontStruct[nIdx]->fid == 0) )
+ mpXFontStruct[nIdx]->fid = XLoadFont(mpDisplay, aFontName.GetBuffer());
+ return nIdx;
+}
+
+XFontStruct*
+ExtendedFontStruct::GetFontStruct( rtl_TextEncoding nEncoding )
+{
+ int nIdx = LoadEncoding( nEncoding );
+ return nIdx < 0 ? NULL : mpXFontStruct[nIdx] ;
+}
+
+Bool
+ExtendedFontStruct::GetFontBoundingBox( XCharStruct *pCharStruct,
+ int *pAscent, int *pDescent )
+{
+ pCharStruct->lbearing = 0;
+ pCharStruct->rbearing = 0;
+ pCharStruct->width = 0;
+ pCharStruct->ascent = 0;
+ pCharStruct->descent = 0;
+
+ *pAscent = 0;
+ *pDescent = 0;
+
+ int nIdx;
+
+ // check whether there is at least one encoding allready loaded
+ Bool bEmpty = True;
+ for ( nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ )
+ bEmpty = bEmpty && (mpXFontStruct[nIdx] == NULL);
+ if ( bEmpty )
+ LoadEncoding( mpXlfd->GetAsciiEncoding() );
+
+ // get the max bounding box from all font structs
+ for ( nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ )
+ if ( mpXFontStruct[ nIdx ] != NULL )
+ {
+ *pAscent = max( mpXFontStruct[nIdx]->ascent, *pAscent );
+ *pDescent = max( mpXFontStruct[nIdx]->descent, *pDescent );
+
+ XCharStruct* pMaxBounds = &(mpXFontStruct[nIdx]->max_bounds);
+
+ pCharStruct->lbearing = max( pMaxBounds->lbearing,
+ pCharStruct->lbearing );
+ pCharStruct->rbearing = max( pMaxBounds->rbearing,
+ pCharStruct->rbearing );
+ pCharStruct->width = max( pMaxBounds->width,
+ pCharStruct->width );
+ pCharStruct->ascent = max( pMaxBounds->ascent,
+ pCharStruct->ascent );
+ pCharStruct->descent = max( pMaxBounds->descent,
+ pCharStruct->descent );
+ }
+
+ return (pCharStruct->width > 0);
+}
+
+Bool
+ExtendedFontStruct::ToImplFontMetricData(ImplFontMetricData *pFontMetric)
+{
+ pFontMetric->mnOrientation = 0;
+ pFontMetric->mnSlant = 0;
+ pFontMetric->mbDevice = TRUE;
+
+ pFontMetric->meCharSet = mpXlfd->GetEncoding( );
+ pFontMetric->meFamily = mpXlfd->GetFamily();
+ pFontMetric->meWeight = mpXlfd->GetWeight();
+ pFontMetric->mePitch = mpXlfd->GetSpacing();
+ pFontMetric->meItalic = mpXlfd->GetItalic();
+ pFontMetric->meType = mpXlfd->GetFontType();
+
+ int nAscent, nDescent;
+ XCharStruct aBoundingBox;
+ if ( GetFontBoundingBox(&aBoundingBox, &nAscent, &nDescent) )
+ {
+ pFontMetric->mnWidth = aBoundingBox.width;
+ pFontMetric->mnAscent = aBoundingBox.ascent;
+ pFontMetric->mnDescent = aBoundingBox.descent;
+ pFontMetric->mnLeading = max(0, aBoundingBox.ascent - nAscent
+ + aBoundingBox.descent - nDescent );
+ // XXX Fix me
+ pFontMetric->mnFirstChar = 0;
+ pFontMetric->mnLastChar = 255;
+
+ return True;
+ }
+ else
+ {
+ return False;
+ }
+}
+
+Bool
+ExtendedFontStruct::Match( const ExtendedXlfd *pXlfd, int nPixelSize ) const
+{
+ if( mpXlfd != pXlfd )
+ return FALSE;
+
+ return mnPixelSize == nPixelSize;
+}
+
+// Get an appropriate x-font that contains a glyph for the given unicode
+// code point.
+// This routine is designed to be called for each character in a text.
+// It first checks the given encoding to optimize for the fact that two
+// adjacent characters in a text most probably have the same encoding
+// In the first call initialize pEncodingInOut to dontknow, this causes
+// EncodingHasChar() to fail and thus bootstraps the encoding, otherwise
+// make sure that the initial value of pFontInOut matches the encoding and
+// that the encoding is valid for the font.
+Bool
+ExtendedFontStruct::GetFontStruct( sal_Unicode nChar,
+ rtl_TextEncoding *pEncodingInOut, XFontStruct **pFontInOut,
+ SalConverterCache *pCvt )
+{
+ if ( pCvt->EncodingHasChar(*pEncodingInOut, nChar) )
+ {
+ return True;
+ }
+ else
+ {
+ for ( int nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ )
+ {
+ rtl_TextEncoding nEnc = mpXlfd->GetEncoding(nIdx);
+ if ( (nEnc != *pEncodingInOut)
+ && pCvt->EncodingHasChar(nEnc, nChar) )
+ {
+ *pEncodingInOut = nEnc;
+ *pFontInOut = GetFontStruct( nEnc );
+ return True;
+ }
+ }
+ }
+
+ return False;
+}
+
+
+// ---------------------------------------------------------------------------
+// utility functions to handle xfontstruct information, this is all to
+// calculate charwidth information
+// ---------------------------------------------------------------------------
+
+static Bool
+CharExists( const XCharStruct* pChar )
+{
+ if ( pChar == NULL )
+ return False;
+
+ return pChar->width
+ || pChar->ascent || pChar->descent
+ || pChar->lbearing || pChar->rbearing;
+}
+
+// this relies on non-null per_char information in the fontstruct
+static XCharStruct*
+GetCharinfo( const XFontStruct *pXFontStruct, sal_MultiByte nChar )
+{
+ unsigned int nRow = nChar >> 8;
+ unsigned int nCol = nChar & 0xFF;
+
+ int nMinRow = pXFontStruct->min_byte1;
+ int nMaxRow = pXFontStruct->max_byte1;
+ int nMinCol = pXFontStruct->min_char_or_byte2;
+ int nMaxCol = pXFontStruct->max_char_or_byte2;
+
+ if ( nRow >= nMinRow && nRow <= nMaxRow
+ && nCol >= nMinCol && nCol <= nMaxCol )
+ {
+ return &pXFontStruct->per_char[
+ (nRow-nMinRow) * (nMaxCol-nMinCol+1) + (nCol-nMinCol) ];
+ }
+
+ return NULL;
+}
+
+static sal_Size
+QueryCharWidth16( Display* pDisplay, XLIB_Font nFontID, sal_MultiByte nChar,
+ sal_Size nDefaultWidth )
+{
+ int nDirection, nFontAscent, nFontDescent;
+ XCharStruct aBoundingBox;
+
+ XQueryTextExtents16( pDisplay, nFontID, (XChar2b*)&nChar, 1,
+ &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox );
+
+ return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth;
+}
+
+static sal_Size
+QueryCharWidth8( XFontStruct* pXFontStruct, sal_Char nChar,
+ sal_Size nDefaultWidth )
+{
+ int nDirection, nFontAscent, nFontDescent;
+ XCharStruct aBoundingBox;
+
+ XTextExtents( pXFontStruct, &nChar, 1,
+ &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox );
+
+ return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth;
+}
+
+// the default width is the width of the question mark since this is the
+// character which is displayed for unconvertable unicode chars
+sal_Size
+ExtendedFontStruct::GetDefaultWidth( SalConverterCache* pCvt )
+{
+ rtl_TextEncoding nEncoding = mpXlfd->GetAsciiEncoding();
+ XFontStruct* pXFontStruct = GetFontStruct( nEncoding );
+
+ if ( pXFontStruct != NULL )
+ {
+ sal_Unicode nQuestionMark = 0x3f;
+ sal_MultiByte nChar;
+ sal_Char pBuffer[8];
+
+ sal_Size nSize = ConvertStringUTF16( &nQuestionMark, 1, pBuffer,
+ sizeof(pBuffer), pCvt->GetU2TConverter(nEncoding) );
+ if ( nSize == 2 )
+ {
+ nChar = ((sal_MultiByte)pBuffer[0] << 8)
+ + (sal_MultiByte)pBuffer[1];
+ return QueryCharWidth16( mpDisplay, pXFontStruct->fid, nChar, 0 );
+ }
+ else
+ if ( nSize == 1 )
+ {
+ return QueryCharWidth8( pXFontStruct, pBuffer[0], 0 );
+ }
+ else
+ {
+ return QueryCharWidth8( pXFontStruct, nQuestionMark, 0 );
+ }
+ }
+
+ return 0;
+}
+
+// Handle single byte fonts which do not require conversion, this exploits
+// the fact that unicode equals latin1 or ansi1252 in the range [0..0xff] and
+// is compatible with iso8859-X at least in the range to 0x7f
+sal_Size
+ExtendedFontStruct::GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo,
+ long *pWidthArray, rtl_TextEncoding nEncoding )
+{
+ if ( !(nFrom <= nTo) )
+ return 0;
+
+ XFontStruct* pXFontStruct = GetFontStruct( nEncoding );
+ if ( pXFontStruct == NULL )
+ return 0;
+
+ // query the font metrics
+ if ( (pXFontStruct->max_bounds.width == pXFontStruct->min_bounds.width)
+ || (pXFontStruct->per_char == NULL) )
+ {
+ // fixed width font
+ for ( int nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ )
+ *pWidthArray = mnDefaultWidth;
+ }
+ else
+ {
+ // variable width font
+ int nMinChar = pXFontStruct->min_char_or_byte2;
+ int nMaxChar = pXFontStruct->max_char_or_byte2;
+
+ int nIdx = nFrom;
+
+ for ( ; nIdx < min(nTo, nMinChar); nIdx++, pWidthArray++ )
+ *pWidthArray = mnDefaultWidth;
+ for ( ; nIdx <= min(nTo, nMaxChar); nIdx++, pWidthArray++ )
+ {
+ XCharStruct* pChar = &(pXFontStruct->per_char[nIdx - nMinChar]);
+ *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth;
+ }
+ for ( ; nIdx <= nTo; nIdx++, pWidthArray++ )
+ *pWidthArray = mnDefaultWidth;
+ }
+
+ // return amount of handled chars
+ return nTo - nFrom + 1;
+}
+
+// Handle utf16 encoded fonts, which do not require conversion
+sal_Size
+ExtendedFontStruct::GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo,
+ long *pWidthArray )
+{
+ if ( !(nFrom <= nTo) )
+ return 0;
+
+ XFontStruct* pXFontStruct = GetFontStruct( RTL_TEXTENCODING_UNICODE );
+ FontPitch nSpacing = mpXlfd->GetSpacing( RTL_TEXTENCODING_UNICODE );
+
+ if ( pXFontStruct == NULL )
+ return 0;
+
+ // query the font metrics
+ if ( nSpacing == PITCH_VARIABLE
+ && pXFontStruct->per_char == NULL)
+ {
+ // get per_char information from the server
+ for ( sal_Unicode nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ )
+ *pWidthArray = QueryCharWidth16( mpDisplay, pXFontStruct->fid,
+ nIdx, mnDefaultWidth );
+ }
+ else
+ if ( (pXFontStruct->max_bounds.width == pXFontStruct->min_bounds.width)
+ || (pXFontStruct->per_char == NULL) )
+ {
+ // really a fixed width font
+ for ( sal_Unicode nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ )
+ *pWidthArray = mnDefaultWidth;
+ }
+ else
+ {
+ // get per_char information from the xfontstruct
+ for ( sal_Unicode nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ )
+ {
+ XCharStruct* pChar = GetCharinfo( pXFontStruct, nIdx );
+ *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth;
+ }
+ }
+
+ // return amount of handled chars
+ return nTo - nFrom + 1;
+}
+
+// handle non unicode fonts that are converted into encoding mathing the
+// font in fontstruct, 8 and 16 bit fonts are handled the same way
+sal_Size
+ExtendedFontStruct::GetCharWidth16( SalConverterCache *pCvt,
+ sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray )
+{
+ if ( !(nFrom <= nTo) )
+ return 0;
+
+ rtl_TextEncoding nEncoding = mpXlfd->GetAsciiEncoding();
+ XFontStruct *pXFontStruct = GetFontStruct( nEncoding );
+
+ if ( pXFontStruct == NULL )
+ return 0;
+
+ unsigned char pBuffer[16];
+ sal_MultiByte nChar;
+
+ for ( sal_Unicode nIdx = nFrom ; nIdx <= nTo ; nIdx++, pWidthArray++ )
+ {
+ Bool bValid;
+ FontPitch nSpacing;
+ sal_Size nSize;
+
+ // get a matching fontstruct
+ if ( bValid = GetFontStruct( nIdx, &nEncoding, &pXFontStruct, pCvt ) )
+ {
+ nSpacing = mpXlfd->GetSpacing( nEncoding );
+ nSize = ConvertStringUTF16( &nIdx, 1,
+ (sal_Char*)pBuffer, sizeof(pBuffer),
+ pCvt->GetU2TConverter(nEncoding) );
+ }
+
+ // query font metrics
+ if ( bValid && (nSize == 1 || nSize == 2) )
+ {
+ nChar = nSize == 1 ? (sal_MultiByte)pBuffer[0] :
+ ((sal_MultiByte)pBuffer[0] << 8) + (sal_MultiByte)pBuffer[1];
+
+ if ( nSpacing == PITCH_VARIABLE
+ && pXFontStruct->per_char == NULL)
+ {
+ // get per_char information from the x-server
+ *pWidthArray = QueryCharWidth16( mpDisplay, pXFontStruct->fid,
+ nChar, mnDefaultWidth );
+ }
+ else
+ if ( ( pXFontStruct->max_bounds.width
+ == pXFontStruct->min_bounds.width)
+ || (pXFontStruct->per_char == NULL) )
+ {
+ // fixed width font
+ *pWidthArray = pXFontStruct->min_bounds.width;
+ }
+ else
+ {
+ // get per_char information from the xfontstruct
+ XCharStruct* pChar = GetCharinfo( pXFontStruct, nChar );
+ *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth;
+ }
+ }
+ else
+ {
+ // conversion error
+ *pWidthArray = mnDefaultWidth;
+ }
+ }
+
+ // return amount of handled chars
+ return nTo - nFrom + 1;
+}
+
+sal_Size
+ExtendedFontStruct::GetCharWidth( SalConverterCache *pCvt,
+ sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray )
+{
+ int nAsciiRange;
+ sal_Size nConverted = 0;
+
+ rtl_TextEncoding nEncoding = mpXlfd->GetAsciiEncoding(&nAsciiRange);
+
+ // dispatch querying of metrics to most promising encoding candidate
+ if ( nEncoding == RTL_TEXTENCODING_UNICODE )
+ {
+ // if we have a unicode encoded system font than we get the charwidth
+ // straight forward
+ nConverted = GetCharWidthUTF16( nFrom, nTo, pWidthArray );
+ }
+ else
+ {
+ if ( nFrom < nAsciiRange )
+ {
+ // optimize the most frequent case, requesting only the latin1
+ // chars which are mappable to a single encoding
+ nConverted = GetCharWidth8( nFrom, min(nAsciiRange, nTo),
+ pWidthArray, nEncoding );
+ }
+
+ // if further requests are pending, then the according unicode
+ // codepoint has to be dispatched to one of the system fonts and
+ // converted to this fonts encoding
+ nConverted += GetCharWidth16( pCvt, nFrom + nConverted, nTo,
+ pWidthArray + nConverted );
+ }
+
+ return nConverted;
+}
diff --git a/vcl/unx/source/gdi/xlfd_attr.cxx b/vcl/unx/source/gdi/xlfd_attr.cxx
new file mode 100644
index 000000000000..a5571d43311a
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_attr.cxx
@@ -0,0 +1,655 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_attr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <alloca.h>
+
+#ifndef XLFD_ATTRIBUTE_HXX
+#include "xlfd_attr.hxx"
+#endif
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+#ifndef _VCL_VCLENUM_HXX
+#include <vclenum.hxx>
+#endif
+
+// ---------------------------------------------------------------------------
+//
+//
+// Attribute is a container for simple name value pairs
+// eg. ( "times", FAMILY_ROMAN ) or ( "demi bold", WEIGHT_SEMIBOLD )
+// enriched with an annotation which is a pretty-printed version of the
+// string, i.e. "itc avant garde" would get an annotation of "Itc Avant Garde"
+//
+//
+// ---------------------------------------------------------------------------
+
+// release the stored string
+void
+Attribute::Release()
+{
+ if ( mpAnnotation != NULL )
+ delete mpAnnotation;
+ if ( mpName != NULL )
+ free( (void*)mpName );
+}
+
+// get a private copy of the given argument
+void
+Attribute::SetName( const char *p, int nLen )
+{
+ mpName = (char*)malloc( nLen + 1 );
+ mnLength = nLen;
+ memcpy( (void*)mpName, p, mnLength );
+ ((char*)mpName)[ mnLength ] = '\0';
+}
+
+// Compare whether two strings a equal for the first nLen bytes
+// i.e. arial == arialnarrow
+int
+Attribute::Compare( const char *p, int nLen )
+{
+ return strncmp( mpName, p, nLen );
+}
+
+// Compare two strings, they have to be equal for nLen bytes, after nLen
+// bytes both strings have to be terminated either by '\0' or by '-'
+// this is for comparing a string being a substring in a Xlfd with a
+// zeroterminated string
+Bool
+Attribute::ExactMatch( const char *p, int nLen )
+{
+ Bool bMatch;
+ if ( nLen > 0 )
+ bMatch = Compare( p, nLen ) == 0;
+ else
+ bMatch = True;
+ if ( bMatch )
+ {
+ char c1 = p[ nLen ];
+ char c2 = mpName[ nLen ];
+ bMatch = (c1 == '-' || c1 == '\0') && (c2 == '-' || c2 == '\0');
+ }
+
+ return bMatch;
+}
+
+void
+Attribute::TagFeature( unsigned short nFeature )
+{
+ if ( (nFeature & XLFD_FEATURE_NARROW)
+ && (strstr(mpName, "narrow") != NULL) )
+ {
+ mnFeature |= XLFD_FEATURE_NARROW;
+ }
+ if ( (nFeature & XLFD_FEATURE_OL_CURSOR)
+ && (strcmp(mpName, "open look cursor") == 0) )
+ {
+ mnFeature |= XLFD_FEATURE_OL_CURSOR;
+ }
+ if ( (nFeature & XLFD_FEATURE_OL_GLYPH)
+ && (strcmp(mpName, "open look glyph") == 0) )
+ {
+ mnFeature |= XLFD_FEATURE_OL_GLYPH;
+ }
+
+ if ( nFeature & XLFD_FEATURE_REDUNDANTSTYLE )
+ {
+ switch ( mpName[0] )
+ {
+ case '\0':
+ mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
+ break;
+
+ case 'b':
+ if ( (strcmp(mpName, "bold") == 0)
+ || (strcmp(mpName, "bold italic") == 0)
+ || (strcmp(mpName, "bold sans") == 0) )
+ mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
+ break;
+
+ case 'd':
+ if ( (strcmp(mpName, "demi") == 0)
+ || (strcmp(mpName, "demi italic") == 0) )
+ mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
+ break;
+
+ case 'i':
+ if ( strcmp(mpName, "italic") == 0 )
+ mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
+ break;
+
+ case 's':
+ if ( (strcmp(mpName, "sans") == 0)
+ || (strcmp(mpName, "serif") == 0) )
+ mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
+ break;
+ }
+ }
+}
+
+// given Attribute classifications, strings have to be in alphabetical
+// order, since they are treated by binary search algorithm
+
+#define InitializeAttributeWith( p, a ) p, sizeof(p) - 1, a, 0, NULL
+#define MembersOf( p ) (sizeof(p) / sizeof(p[0]) )
+
+const Attribute pFamilyAttribute[] = {
+ { InitializeAttributeWith( "arial", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "arioso", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "avant garde", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "avantgarde", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "bembo", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "bookman", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "conga", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "courier", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "curl", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "fixed", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "gill", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "helmet", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "helvetica", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "international", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "lucida", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "new century schoolbook", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "palatino", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "roman", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "sans serif", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "sansserif", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "serf", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "serif", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "times", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "utopia", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "zapf chancery", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "zapfchancery", FAMILY_SCRIPT ) }
+};
+
+const Attribute pWeightAttribute[] = {
+ { InitializeAttributeWith( "black", WEIGHT_BLACK ) },
+ { InitializeAttributeWith( "bold", WEIGHT_BOLD ) },
+ { InitializeAttributeWith( "book", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "demi", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "demi bold", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "demibold", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "light", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "medium", WEIGHT_MEDIUM ) },
+ { InitializeAttributeWith( "normal", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "regular", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "roman", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "semicondensed", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "ultrabold", WEIGHT_ULTRABOLD ) }
+};
+
+const Attribute pSlantAttribute[] = {
+ { InitializeAttributeWith( "i", ITALIC_NORMAL ) },
+ { InitializeAttributeWith( "o", ITALIC_OBLIQUE ) },
+ { InitializeAttributeWith( "r", ITALIC_NONE ) }
+};
+
+const Attribute pSetwidthAttribute[] = {
+ { InitializeAttributeWith( "bold", WIDTH_SEMI_EXPANDED ) },
+ { InitializeAttributeWith( "condensed", WIDTH_CONDENSED ) },
+ { InitializeAttributeWith( "double wide", WIDTH_ULTRA_EXPANDED ) },
+ { InitializeAttributeWith( "expanded", WIDTH_EXPANDED ) },
+ { InitializeAttributeWith( "extracondensed", WIDTH_EXTRA_CONDENSED ) },
+ { InitializeAttributeWith( "extraexpanded", WIDTH_EXTRA_EXPANDED ) },
+ { InitializeAttributeWith( "medium", WIDTH_NORMAL ) },
+ { InitializeAttributeWith( "narrow", WIDTH_CONDENSED ) },
+ { InitializeAttributeWith( "normal", WIDTH_NORMAL ) },
+ { InitializeAttributeWith( "semicondensed", WIDTH_SEMI_CONDENSED ) },
+ { InitializeAttributeWith( "semiexpanded", WIDTH_SEMI_EXPANDED ) },
+ { InitializeAttributeWith( "ultracondensed", WIDTH_ULTRA_CONDENSED ) },
+ { InitializeAttributeWith( "ultraexpanded", WIDTH_ULTRA_EXPANDED ) },
+ { InitializeAttributeWith( "wide", WIDTH_EXPANDED ) }
+};
+
+const Attribute pEnhancedCharsetAttribute[] = {
+ { InitializeAttributeWith( "iso8859-1", RTL_TEXTENCODING_MS_1252 ) },
+ { InitializeAttributeWith( "iso8859_1", RTL_TEXTENCODING_MS_1252 ) }
+};
+
+// -------------------------------------------------------------------------
+//
+// String handling utility functions
+//
+// -------------------------------------------------------------------------
+
+
+void
+AppendAttribute( Attribute *pAttribute, ByteString &rString )
+{
+ if ( pAttribute == NULL )
+ return ;
+
+ int nLength = pAttribute->GetLength();
+ char *pBuffer = (char*)alloca( nLength + 1);
+
+ pBuffer[ 0 ] = '-';
+ memcpy( pBuffer + 1, pAttribute->GetName(), nLength );
+ rString.Append( pBuffer, nLength + 1);
+}
+
+//
+// Prettify the font name: make each leading character of a fontname
+// uppercase. For example
+// times new roman -> Times New Roman
+//
+
+static void
+ToUpper( char *pCharacter )
+{
+ // replace [a,z] with [A,Z]
+ if ( (*pCharacter >= 97) && (*pCharacter <= 122) )
+ *pCharacter -= 32;
+}
+
+static String*
+Capitalize( const char *pStr, int nLength )
+{
+ char *pCopy = (char*)alloca( nLength + 1 );
+ char *pPtr = pCopy;
+ memcpy( pPtr, pStr, nLength + 1 );
+
+ // loop over string data and uppercase first char and all chars
+ // following a space (other white space would be unexpected here)
+ char nPreviousChar = ' ';
+ while ( *pPtr )
+ {
+ if ( nPreviousChar == ' ' )
+ ToUpper( pPtr );
+ nPreviousChar = *pPtr++;
+ }
+
+ return new String( pCopy, RTL_TEXTENCODING_ISO_8859_1 );
+}
+
+String*
+AnnotateString( const Attribute& rAttribute )
+{
+ return Capitalize(rAttribute.GetName(), rAttribute.GetLength());
+}
+
+String*
+AnnotateSlant( const Attribute& rAttribute )
+{
+ const char* pStr = rAttribute.GetName();
+ int nLen = rAttribute.GetLength();
+
+ static const struct {
+ const char *pFrom; const char *pTo;
+ } pTranslation[] = {
+ { "r", "Roman" },
+ { "o", "Oblique" },
+ { "i", "Italic" },
+ { "ri", "Reverse Italic" },
+ { "ro", "Reverse Oblique" },
+ { "ot", "Other" }
+ };
+
+ for ( int i = 0; i < MembersOf(pTranslation); i++ )
+ if ( strcmp(pStr, pTranslation[i].pFrom) == 0 )
+ {
+ return new String( pTranslation[i].pTo,
+ RTL_TEXTENCODING_ISO_8859_1 );
+ }
+
+ return Capitalize(pStr, nLen);
+}
+
+String*
+AnnotateNone( const Attribute& rAttribute )
+{
+ return new String();
+}
+
+// ---------------------------------------------------------------------------
+//
+//
+// manage global lists of Attributes
+// since XListFonts does never list more than 64K fonts this storage does
+// handle array size and indices with unsigned short values for low
+// memory consumption
+//
+//
+// ---------------------------------------------------------------------------
+
+AttributeStorage::AttributeStorage( unsigned short nDefaultValue ) :
+ mpList( NULL ),
+ mnSize( 0 ),
+ mnCount( 0 ),
+ mnLastmatch( 0 ),
+ mnDefaultValue( nDefaultValue )
+{
+}
+
+AttributeStorage::~AttributeStorage()
+{
+ if ( mpList != NULL )
+ {
+ for ( int i = 0; i < mnCount; i++ )
+ mpList[i].Release();
+ free( mpList );
+ }
+}
+
+#ifdef DEBUG
+void
+AttributeStorage::Dump()
+{
+ fprintf(stderr, "AttributeStorage: size=%i, used=%i\n", mnSize, mnCount);
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ ByteString aAnnotation = ByteString(
+ mpList[i].GetAnnotation(),
+ RTL_TEXTENCODING_ISO_8859_1 );
+ fprintf(stderr, "\t%4i: <%s><len=%i><val=%i><%s>\n", i, mpList[i].GetName(),
+ mpList[i].GetLength(), mpList[i].GetValue(),
+ aAnnotation.GetBuffer() );
+ }
+ fprintf(stderr, "\n");
+}
+#endif
+
+Attribute*
+AttributeStorage::Retrieve( unsigned short nIndex ) const
+{
+ return nIndex < mnCount ? &mpList[ nIndex ] : (Attribute*)NULL ;
+}
+
+// pClassification contains a list of name-value pairs. If names in
+// the AttributeStorage match those in the pClassification then
+// the according value is copied. Matching means match for the length
+// of the string in pClassification (i.e. arial matches arialnarrow)
+// the strings in pClassification must be in alphabetical order, all
+// strings Lowercase
+void
+AttributeStorage::AddClassification( Attribute *pClassification,
+ unsigned short nNum )
+{
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ unsigned int nLower = 0;
+ unsigned int nUpper = nNum;
+ unsigned int nCurrent;
+ int nComparison;
+ Attribute *pHaystack, *pNeedle;
+
+ pNeedle = &mpList[ i ];
+
+ // binary search
+ while ( nLower < nUpper )
+ {
+ nCurrent = (nLower + nUpper) / 2;
+ pHaystack = &pClassification[ nCurrent ];
+ nComparison = pNeedle->Compare( pHaystack->GetName(),
+ pHaystack->GetLength() );
+ if (nComparison < 0)
+ nUpper = nCurrent;
+ else
+ if (nComparison > 0)
+ nLower = nCurrent + 1;
+ else
+ break;
+ }
+
+ // if there's a match store the according classification in the
+ // Attribute storage, otherwise do nothing since defaults are
+ // already provided in AttributeStorage::Insert()
+ if ( nComparison == 0 )
+ pNeedle->SetValue( pHaystack->GetValue() );
+ }
+}
+
+void
+AttributeStorage::AddClassification( AttributeClassifierT Classify )
+{
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ Attribute& rCurrent = mpList[i] ;
+ int nValue = Classify( rCurrent.GetName() );
+ rCurrent.SetValue( nValue );
+ }
+}
+
+void
+AttributeStorage::AddAnnotation( AttributeAnnotatorT Annotate )
+{
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ String* pAnnotation = Annotate( mpList[i] );
+ mpList[i].SetAnnotation( pAnnotation );
+ }
+}
+
+void
+AttributeStorage::TagFeature( unsigned short nFeature )
+{
+ for ( int i = 0; i < mnCount; i++ )
+ mpList[i].TagFeature( nFeature );
+}
+
+// Enlarge the list of Attributes
+void
+AttributeStorage::Enlarge()
+{
+ if ( mnSize == 0 )
+ {
+ mnSize = 8;
+ mpList = (Attribute*) malloc( mnSize * sizeof(Attribute) );
+ }
+ else
+ {
+ mnSize = mnSize < 32768 ? (mnSize * 2) : 65535;
+ mpList = (Attribute*) realloc( mpList, mnSize * sizeof(Attribute) );
+ }
+}
+
+// nLength is the length as it would be reported by strlen(3)
+// for an null-terminated string. if a string is part of a Xlfd
+// the field separator '-' is taken as '\0'
+// the AttributeStorage itself is NOT sorted to make sure that the
+// leased keys are still valid
+unsigned short
+AttributeStorage::Insert( const char *pString, int nLength )
+{
+ // check whether the last match is still equal to the current
+ // string since XListFonts lists fonts in sets of similar fontnames
+ if ( mnLastmatch < mnCount )
+ {
+ if ( mpList[mnLastmatch].ExactMatch(pString, nLength) )
+ return mnLastmatch;
+ }
+
+ // otherwise search in list
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ if ( mpList[i].ExactMatch(pString, nLength) )
+ return mnLastmatch = i;
+ }
+
+ // if still not found we have to Insert the new string
+ if ( mnSize == mnCount )
+ Enlarge();
+ mpList[mnCount].SetName( pString, nLength );
+ mpList[mnCount].SetValue( mnDefaultValue );
+ mpList[mnCount].SetAnnotation( NULL );
+ mpList[mnCount].SetFeature( XLFD_FEATURE_NONE );
+ mnLastmatch = mnCount;
+ mnCount = mnCount < 65535 ? mnCount + 1 : mnCount;
+
+ return mnLastmatch;
+}
+
+
+// ---------------------------------------------------------------------------
+//
+//
+// Attribute provider is a frame for a set of AttributeStorages.
+//
+//
+// ---------------------------------------------------------------------------
+
+AttributeProvider::AttributeProvider( eDeviceT eOutputDevice ) :
+ meOutputDevice( eOutputDevice )
+{
+ mpField[eXLFDFoundry ] = new AttributeStorage(0);
+ mpField[eXLFDFamilyName ] = new AttributeStorage(FAMILY_DONTKNOW);
+ mpField[eXLFDWeightName ] = new AttributeStorage(WEIGHT_NORMAL);
+ mpField[eXLFDSlant ] = new AttributeStorage(ITALIC_NONE);
+ mpField[eXLFDSetwidthName] = new AttributeStorage(WIDTH_NORMAL);
+ mpField[eXLFDAddstyleName] = new AttributeStorage(RTL_TEXTENCODING_DONTKNOW);
+ mpField[eXLFDCharset ] = new AttributeStorage(RTL_TEXTENCODING_DONTKNOW);
+}
+
+AttributeProvider::~AttributeProvider()
+{
+ for ( int i = 0; i < eXLFDMaxEntry; i++ )
+ delete mpField[ i ];
+}
+
+#ifdef DEBUG
+void
+AttributeProvider::Dump()
+{
+ for ( int i = 0; i < eXLFDMaxEntry; i++ )
+ mpField[ i ]->Dump();
+}
+#endif
+
+extern "C" rtl_TextEncoding
+GetTextEncodingFromAddStylename( const sal_Char *pAddStylename )
+{
+ int nBufferLength = strlen( pAddStylename ) + 1;
+ sal_Char *pBuffer = (sal_Char*)alloca( nBufferLength );
+ for ( int i = 0; i < nBufferLength; i++ )
+ pBuffer[i] = pAddStylename[i] == '_' ? '-' : pAddStylename[i] ;
+
+ return rtl_getTextEncodingFromUnixCharset( pBuffer );
+}
+
+
+// classification information is needed before sorting because of course the
+// classification is the sort criteria
+void
+AttributeProvider::AddClassification()
+{
+ /* mpField[ eXLFDFoundry ] doesn't need classification */
+ mpField[ eXLFDFamilyName ]->AddClassification(
+ (Attribute*)pFamilyAttribute,
+ MembersOf(pFamilyAttribute) );
+ mpField[ eXLFDWeightName ]->AddClassification(
+ (Attribute*)pWeightAttribute,
+ MembersOf(pWeightAttribute) );
+ mpField[ eXLFDSlant ]->AddClassification(
+ (Attribute*)pSlantAttribute,
+ MembersOf(pSlantAttribute) );
+ mpField[ eXLFDSetwidthName ]->AddClassification(
+ (Attribute*)pSetwidthAttribute,
+ MembersOf(pSetwidthAttribute) );
+ mpField[ eXLFDAddstyleName ]->AddClassification(
+ GetTextEncodingFromAddStylename );
+ mpField[ eXLFDCharset ]->AddClassification(
+ rtl_getTextEncodingFromUnixCharset );
+
+ // Postscript Fonts usually have usefull glyphs in the area 128 - 160 these
+ // are not accessible through the latin1 encoding but through the
+ // ansi1252 encoding
+ if ( meOutputDevice == eDevicePrinter )
+ {
+ mpField[ eXLFDAddstyleName ]->AddClassification(
+ (Attribute*)pEnhancedCharsetAttribute,
+ MembersOf(pEnhancedCharsetAttribute) );
+ mpField[ eXLFDCharset ]->AddClassification(
+ (Attribute*)pEnhancedCharsetAttribute,
+ MembersOf(pEnhancedCharsetAttribute) );
+ }
+}
+
+// add some pretty print description
+void
+AttributeProvider::AddAnnotation()
+{
+ mpField[ eXLFDFoundry ]->AddAnnotation( AnnotateNone );
+ mpField[ eXLFDFamilyName ]->AddAnnotation( AnnotateString );
+ mpField[ eXLFDWeightName ]->AddAnnotation( AnnotateString );
+ mpField[ eXLFDSlant ]->AddAnnotation( AnnotateSlant );
+ mpField[ eXLFDSetwidthName ]->AddAnnotation( AnnotateString );
+ mpField[ eXLFDAddstyleName ]->AddAnnotation( AnnotateNone );
+ mpField[ eXLFDCharset ]->AddAnnotation( AnnotateNone );
+}
+
+// this is the misc or any section: dirty hacks for dirty xlfd usage
+void
+AttributeProvider::TagFeature()
+{
+ mpField[ eXLFDFamilyName ]->TagFeature(
+ XLFD_FEATURE_OL_GLYPH
+ | XLFD_FEATURE_OL_CURSOR
+ | XLFD_FEATURE_NARROW );
+
+ mpField[ eXLFDSetwidthName ]->TagFeature(
+ XLFD_FEATURE_NARROW );
+
+ mpField[ eXLFDAddstyleName ]->TagFeature(
+ XLFD_FEATURE_REDUNDANTSTYLE );
+}
+
diff --git a/vcl/unx/source/gdi/xlfd_attr.hxx b/vcl/unx/source/gdi/xlfd_attr.hxx
new file mode 100644
index 000000000000..a48da64c0c39
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_attr.hxx
@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_attr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef XLFD_ATTRIBUTE_HXX
+#define XLFD_ATTRIBUTE_HXX
+
+#ifndef _SALUNX_H
+#include <salunx.h>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+
+struct Attribute {
+
+ const char* mpName;
+ unsigned short mnLength;
+ unsigned short mnValue;
+ unsigned short mnFeature;
+ String* mpAnnotation;
+
+ const char* GetName() const
+ { return mpName; }
+ unsigned short GetValue() const
+ { return mnValue; }
+ unsigned short GetLength() const
+ { return mnLength; }
+ Bool HasFeature( unsigned short nFeature ) const
+ { return ((mnFeature & nFeature) != 0); }
+ const String &GetAnnotation() const
+ { return *mpAnnotation; }
+
+ void SetName( const char *p, int nLen );
+ void SetValue( unsigned short nIn )
+ { mnValue = nIn; }
+ void SetAnnotation( String *pString )
+ { mpAnnotation = pString; }
+ void SetFeature( unsigned short nFeature )
+ { mnFeature = nFeature; }
+ void TagFeature( unsigned short nFeature );
+
+ int Compare( const char *p, int nLen );
+ Bool ExactMatch( const char *p, int nLen );
+ void Release();
+};
+
+
+void
+AppendAttribute( Attribute *pAttribute, ByteString &rString );
+
+
+typedef String*(*AttributeAnnotatorT)(const Attribute &rAttribute);
+extern "C" {
+typedef rtl_TextEncoding(*AttributeClassifierT)(const char* pStr);
+}
+
+#define XLFD_FEATURE_NONE 0x00
+#define XLFD_FEATURE_NARROW 0x01
+#define XLFD_FEATURE_OL_GLYPH 0x02
+#define XLFD_FEATURE_OL_CURSOR 0x04
+#define XLFD_FEATURE_REDUNDANTSTYLE 0x08
+
+// ---------------------------------------------------------------------------
+//
+//
+// manage global lists of Attributes
+// since XListFonts does never list more than 64K fonts this storage does
+// handle array size and indices with unsigned short values for low
+// memory consumption
+//
+//
+// ---------------------------------------------------------------------------
+
+class AttributeStorage {
+
+ private:
+
+ Attribute* mpList;
+ unsigned short mnSize;
+ unsigned short mnCount;
+ unsigned short mnLastmatch;
+ unsigned short mnDefaultValue;
+
+ void Enlarge();
+ AttributeStorage();
+
+ public:
+
+ AttributeStorage( unsigned short nDefaultValue );
+ ~AttributeStorage();
+ unsigned short Insert( const char *pString, int nLength );
+ Attribute* Retrieve( unsigned short nIndex ) const ;
+ void AddClassification( Attribute *pClassification,
+ unsigned short nNum );
+ void AddClassification( AttributeClassifierT Classify );
+ void TagFeature( unsigned short nFeature );
+ void AddAnnotation( AttributeAnnotatorT Annotate );
+ #ifdef DEBUG
+ void Dump();
+ #endif
+};
+
+
+// ---------------------------------------------------------------------------
+//
+//
+// Attribute provider is a frame for a set of AttributeStorages. For XLFD
+// interpretation and efficient storage, AttributeStorages for foundry,
+// family_name, weight_name, slant, setwidth_name, add_style_name and combined
+// charset_registry and charset_encoding are used. pixel_size, point_size,
+// resolution_x and resolution_y are stored as numbers. please note that this
+// does not allow storage of matrix-enhanced fonts. spacing is stored as
+// a char, since only the 'm', 'c' and 'p' types are defined.
+//
+//
+// ---------------------------------------------------------------------------
+
+typedef enum eXLFDAttributeT {
+ eXLFDFoundry = 0,
+ eXLFDFamilyName,
+ eXLFDWeightName,
+ eXLFDSlant,
+ eXLFDSetwidthName,
+ eXLFDAddstyleName,
+ eXLFDCharset,
+ eXLFDMaxEntry
+};
+
+typedef enum eDeviceT {
+ eDeviceDontKnow = 0,
+ eDevicePrinter,
+ eDeviceDisplay
+};
+
+class AttributeProvider {
+
+ private:
+
+ AttributeStorage* mpField[ eXLFDMaxEntry ];
+
+ AttributeStorage* GetField( eXLFDAttributeT eXLFDField )
+ { return mpField[ eXLFDField]; }
+ eDeviceT meOutputDevice;
+ public:
+
+ AttributeProvider( eDeviceT eOutputDevice );
+ ~AttributeProvider();
+
+ void AddClassification();
+ void AddAnnotation();
+ void TagFeature();
+ #ifdef DEBUG
+ void Dump();
+ #endif
+
+ eDeviceT GetDevice() const
+ { return meOutputDevice; }
+
+ // these are just shortcuts or proxies for the most common used
+ // AttributeStorage functionality
+ AttributeStorage* GetFoundry()
+ { return GetField(eXLFDFoundry); }
+ AttributeStorage* GetFamily()
+ { return GetField(eXLFDFamilyName); }
+ AttributeStorage* GetWeight()
+ { return GetField(eXLFDWeightName); }
+ AttributeStorage* GetSlant()
+ { return GetField(eXLFDSlant); }
+ AttributeStorage* GetSetwidth()
+ { return GetField(eXLFDSetwidthName); }
+ AttributeStorage* GetAddstyle()
+ { return GetField(eXLFDAddstyleName); }
+ AttributeStorage* GetCharset()
+ { return GetField(eXLFDCharset); }
+
+ Attribute* RetrieveFoundry( unsigned short nIndex )
+ { return GetFoundry()->Retrieve(nIndex); }
+ Attribute* RetrieveFamily( unsigned short nIndex )
+ { return GetFamily()->Retrieve(nIndex); }
+ Attribute* RetrieveWeight( unsigned short nIndex )
+ { return GetWeight()->Retrieve(nIndex); }
+ Attribute* RetrieveSlant( unsigned short nIndex )
+ { return GetSlant()->Retrieve(nIndex); }
+ Attribute* RetrieveSetwidth( unsigned short nIndex )
+ { return GetSetwidth()->Retrieve(nIndex); }
+ Attribute* RetrieveAddstyle( unsigned short nIndex )
+ { return GetAddstyle()->Retrieve(nIndex); }
+ Attribute* RetrieveCharset( unsigned short nIndex )
+ { return GetCharset()->Retrieve(nIndex); }
+
+ unsigned short InsertFoundry( const char *pString, int nLength )
+ { return GetFoundry()->Insert(pString, nLength); }
+ unsigned short InsertFamily( const char *pString, int nLength )
+ { return GetFamily()->Insert(pString, nLength); }
+ unsigned short InsertWeight( const char *pString, int nLength )
+ { return GetWeight()->Insert(pString, nLength); }
+ unsigned short InsertSlant( const char *pString, int nLength )
+ { return GetSlant()->Insert(pString, nLength); }
+ unsigned short InsertSetwidth( const char *pString, int nLength )
+ { return GetSetwidth()->Insert(pString, nLength);}
+ unsigned short InsertAddstyle( const char *pString, int nLength )
+ { return GetAddstyle()->Insert(pString, nLength);}
+ unsigned short InsertCharset( const char *pString, int nLength )
+ { return GetCharset()->Insert(pString, nLength); }
+};
+
+#endif /* XLFD_ATTRIBUTE_HXX */
+
diff --git a/vcl/unx/source/gdi/xlfd_extd.cxx b/vcl/unx/source/gdi/xlfd_extd.cxx
new file mode 100644
index 000000000000..2a8a65ccce53
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_extd.cxx
@@ -0,0 +1,699 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_extd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef XLFD_ATTRIBUTE_HXX
+#include "xlfd_attr.hxx"
+#endif
+#ifndef XLFD_SIMPLE_HXX
+#include "xlfd_smpl.hxx"
+#endif
+#ifndef XLFD_EXTENDED_HXX
+#include "xlfd_extd.hxx"
+#endif
+#ifndef _SV_OUTFONT_HXX
+#include <outfont.hxx>
+#endif
+
+// --------------------------------------------------------------------------
+//
+// classes for Xlfd handling that contain more than a single encoding.
+// Members that may vary through different encodings are stored in
+// a mpEncodingInfo member. There are three different classes:
+// true scalable fonts (truetype and type1) scalable bitmap fonts
+// (the ugly ones) and bitmap fonts. The ExtendedXlfd stores all the members
+// that are specific to a font outline
+// ( e.g. adobe-times-roman-medium-r-normal- X -p- X )
+// and specifies the interface.
+//
+// --------------------------------------------------------------------------
+
+ExtendedXlfd::EncodingInfo&
+ExtendedXlfd::EncodingInfo::operator= ( const Xlfd *pXlfd )
+{
+ mcSpacing = pXlfd->mcSpacing;
+ mnResolutionX = pXlfd->mnResolutionX;
+ mnResolutionY = pXlfd->mnResolutionY;
+ mnAddstyle = pXlfd->mnAddstyle;
+ mnCharset = pXlfd->mnCharset;
+
+ mnEncoding = pXlfd->GetEncoding();
+
+ return *this;
+}
+
+// ------ base class --------------------------------------------------------
+
+ExtendedXlfd::ExtendedXlfd()
+{
+ mpEncodingInfo = NULL;
+ mnEncodings = 0;
+}
+
+ExtendedXlfd::~ExtendedXlfd()
+{
+ if ( mnEncodings != 0 )
+ free( mpEncodingInfo );
+}
+
+inline void*
+Realloc( void *pPtr, sal_Size nSize )
+{
+ return pPtr == NULL ? malloc( nSize ) : realloc( pPtr, nSize );
+}
+
+int
+ExtendedXlfd::GetEncodingIdx( rtl_TextEncoding nEncoding ) const
+{
+ for ( int i = 0; i < mnEncodings; i++ )
+ if ( nEncoding == mpEncodingInfo[i].mnEncoding )
+ return i;
+ return -1;
+}
+
+Bool
+ExtendedXlfd::HasEncoding( rtl_TextEncoding nEncoding ) const
+{
+ return !(GetEncodingIdx( nEncoding ) < 0) ;
+}
+
+rtl_TextEncoding
+ExtendedXlfd::GetEncoding( int i ) const
+{
+ if ( i < mnEncodings && i >= 0 )
+ return mpEncodingInfo[i].mnEncoding;
+
+ return RTL_TEXTENCODING_DONTKNOW;
+}
+
+rtl_TextEncoding
+ExtendedXlfd::GetEncoding() const
+{
+ return mnEncodings == 1 ? mpEncodingInfo[0].mnEncoding : RTL_TEXTENCODING_DONTKNOW;
+}
+
+// query the most unicode / Ascii compatible font: either one of the fonts
+// is utf16 encoded or there's a single byte font which is unicode
+// compatible for the first 256 chars (latin1) or for at least 128
+// chars (most latin-X encodings, cyrillic encodings)
+rtl_TextEncoding
+ExtendedXlfd::GetAsciiEncoding( int *pAsciiRange ) const
+{
+ rtl_TextEncoding nBestEncoding = RTL_TEXTENCODING_DONTKNOW;
+ int nLargestRange = 0x0000;
+
+ for ( int i = 0; i < mnEncodings && nLargestRange < 0xffff; i++ )
+ {
+ rtl_TextEncoding nCurEncoding = mpEncodingInfo[i].mnEncoding;
+ switch ( nCurEncoding )
+ {
+ case RTL_TEXTENCODING_UNICODE:
+ nLargestRange = 0xffff;
+ nBestEncoding = nCurEncoding;
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_1:
+ case RTL_TEXTENCODING_MS_1252:
+ nLargestRange = 0x00ff;
+ nBestEncoding = nCurEncoding;
+ break;
+
+ case RTL_TEXTENCODING_ISO_8859_2:
+ case RTL_TEXTENCODING_ISO_8859_4:
+ case RTL_TEXTENCODING_ISO_8859_5:
+ case RTL_TEXTENCODING_ISO_8859_6:
+ case RTL_TEXTENCODING_ISO_8859_7:
+ case RTL_TEXTENCODING_ISO_8859_8:
+ case RTL_TEXTENCODING_ISO_8859_9:
+ case RTL_TEXTENCODING_ISO_8859_13:
+ case RTL_TEXTENCODING_ISO_8859_15:
+ case RTL_TEXTENCODING_MS_1251:
+ case RTL_TEXTENCODING_KOI8_R:
+ case RTL_TEXTENCODING_JIS_X_0201:
+ if ( nLargestRange < 0x0080 )
+ {
+ nLargestRange = 0x0080;
+ nBestEncoding = nCurEncoding;
+ }
+ break;
+
+ default:
+ if ( nLargestRange == 0x0000 )
+ {
+ nBestEncoding = nCurEncoding;
+ }
+ break;
+ }
+ }
+
+ if ( pAsciiRange != NULL )
+ *pAsciiRange = nLargestRange;
+
+ return nBestEncoding;
+}
+
+Bool
+ExtendedXlfd::AddEncoding( const Xlfd *pXlfd )
+{
+ rtl_TextEncoding nEncoding = pXlfd->GetEncoding();
+
+ if ( HasEncoding(nEncoding) )
+ return False;
+
+ if ( mnEncodings == 0 )
+ {
+ // bootstrap
+ mnFoundry = pXlfd->mnFoundry;
+ mnFamily = pXlfd->mnFamily;
+ mnWeight = pXlfd->mnWeight;
+ mnSlant = pXlfd->mnSlant;
+ mnSetwidth = pXlfd->mnSetwidth;
+ mpFactory = pXlfd->mpFactory;
+ }
+
+ mpEncodingInfo = (EncodingInfo*)Realloc( mpEncodingInfo,
+ (mnEncodings + 1) * sizeof(EncodingInfo) );
+ mpEncodingInfo[ mnEncodings ] = pXlfd;
+ mnEncodings += 1;
+
+ return True;
+}
+
+void
+ExtendedXlfd::ToString( ByteString &rString,
+ unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const
+{
+ AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString );
+ AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
+ AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
+}
+
+// interface to the independent vcl class implfontdata
+// this must not be called if mnEncodings is zero
+void
+ExtendedXlfd::ToImplFontData( ImplFontData *pFontData ) const
+{
+ pFontData->mpSysData = (void*)this;
+
+ Attribute *pFamilyAttr = mpFactory->RetrieveFamily( mnFamily );
+ Attribute *pWeightAttr = mpFactory->RetrieveWeight( mnWeight );
+ Attribute *pWidthAttr = mpFactory->RetrieveSetwidth( mnSetwidth );
+ Attribute *pSlantAttr = mpFactory->RetrieveSlant( mnSlant );
+
+ pFontData->meFamily = GetFamily();
+ pFontData->meWeight = GetWeight();
+ pFontData->meItalic = GetItalic();
+ pFontData->meWidthType = GetWidth();
+
+ // family name
+ pFontData->maName = pFamilyAttr->GetAnnotation();
+
+ // the helvetica narrow hack
+ if ( ! pFamilyAttr->HasFeature(XLFD_FEATURE_NARROW)
+ && pWidthAttr->HasFeature(XLFD_FEATURE_NARROW) )
+ {
+ static const String aNarrow( RTL_CONSTASCII_USTRINGPARAM(" Narrow") );
+ pFontData->maName += aNarrow;
+ }
+
+ // stylename = weight + slant + width
+ // XXX Fix me: there may be a space missing between them
+ String aStyleName;
+ if ( pFontData->meWeight != WEIGHT_NORMAL )
+ aStyleName += pWeightAttr->GetAnnotation();
+ if ( pFontData->meItalic != ITALIC_NONE )
+ aStyleName += pSlantAttr->GetAnnotation();
+ if ( ( pFontData->meWidthType != WIDTH_NORMAL)
+ && (! pWidthAttr->HasFeature(XLFD_FEATURE_NARROW)) )
+ aStyleName += pWidthAttr->GetAnnotation();
+ pFontData->maStyleName = aStyleName;
+
+ pFontData->meCharSet = GetEncoding();
+ pFontData->mbOrientation = TRUE;
+
+ // printer resident font / downloadable
+ pFontData->mbDevice = TRUE;
+
+ // spacing
+ pFontData->mePitch = GetSpacing();
+
+}
+
+static FontPitch
+GetPitch( const char cSpacing )
+{
+ switch ( cSpacing )
+ {
+ case 'c':
+ case 'm': return PITCH_FIXED;
+ case 'p': return PITCH_VARIABLE;
+ default: return PITCH_DONTKNOW;
+ }
+}
+
+// you must not call any of the ExtendedXlfd::GetXXX() functions if the
+// ExtendedXlfd is really empty (i.e. mnEncodings is zero)
+
+FontPitch
+ExtendedXlfd::GetSpacing() const
+{
+ if ( mnEncodings > 0 )
+ return PITCH_VARIABLE;
+ if ( mnEncodings == 1 )
+ return GetPitch( mpEncodingInfo[0].mcSpacing );
+
+ return PITCH_DONTKNOW;
+}
+
+FontPitch
+ExtendedXlfd::GetSpacing( rtl_TextEncoding nEncoding ) const
+{
+ for ( int nIdx = 0; nIdx < mnEncodings; nIdx++ )
+ {
+ if ( mpEncodingInfo[nIdx].mnEncoding == nEncoding )
+ return GetPitch( mpEncodingInfo[nIdx].mcSpacing );
+ }
+ return PITCH_DONTKNOW;
+}
+
+FontFamily
+ExtendedXlfd::GetFamily() const
+{
+ Attribute *pFamilyAttr= mpFactory->RetrieveFamily(mnFamily);
+ return (FontFamily)pFamilyAttr->GetValue();
+}
+
+FontWeight
+ExtendedXlfd::GetWeight() const
+{
+ Attribute *pWeightAttr = mpFactory->RetrieveWeight(mnWeight);
+ return (FontWeight)pWeightAttr->GetValue();
+}
+
+FontItalic
+ExtendedXlfd::GetItalic() const
+{
+ Attribute *pSlantAttr = mpFactory->RetrieveSlant(mnSlant);
+ return (FontItalic)pSlantAttr->GetValue();
+}
+
+FontWidth
+ExtendedXlfd::GetWidth() const
+{
+ Attribute *pWidthAttr = mpFactory->RetrieveSetwidth(mnSetwidth);
+ return (FontWidth)pWidthAttr->GetValue();
+}
+
+#ifdef DEBUG
+void
+ExtendedXlfd::Dump() const
+{
+ for ( int i = 0; i < mnEncodings; i++ )
+ {
+ ByteString aString;
+ ToString( aString, 0, mpEncodingInfo[i].mnEncoding );
+ fprintf( stderr, "%s\n", aString.GetBuffer() );
+ }
+}
+#endif
+
+// ------ class to handle scalable bitmap fonts ------------------------------
+
+ScalableBitmapXlfd::ScalableBitmapXlfd()
+{
+}
+
+ScalableBitmapXlfd::~ScalableBitmapXlfd()
+{
+}
+
+void
+ScalableBitmapXlfd::ToString( ByteString &rString,
+ unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const
+{
+ int nIdx = GetEncodingIdx( nEncoding );
+ if ( nIdx < 0 )
+ return;
+
+ ExtendedXlfd::ToString( rString, nPixelSize, nEncoding );
+ EncodingInfo& rInfo = mpEncodingInfo[ nIdx ];
+
+ AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString );
+
+ rString += '-';
+ rString += ByteString::CreateFromInt32( nPixelSize );
+ rString += "-0-";
+ rString += ByteString::CreateFromInt32( rInfo.mnResolutionX );
+ rString += '-';
+ rString += ByteString::CreateFromInt32( rInfo.mnResolutionY );
+ rString += '-';
+ rString += rInfo.mcSpacing;
+ rString += "-0";
+
+ AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString );
+}
+
+void
+ScalableBitmapXlfd::ToImplFontData( ImplFontData *pFontData ) const
+{
+ ExtendedXlfd::ToImplFontData( pFontData );
+
+ pFontData->meType = TYPE_SCALABLE;
+ pFontData->mnWidth = 0;
+ pFontData->mnHeight = 0;
+ pFontData->mnQuality= 0;
+}
+
+// ------ class to handle true bitmap fonts ----------------------------------
+
+BitmapXlfd::BitmapXlfd( )
+{
+}
+
+BitmapXlfd::~BitmapXlfd( )
+{
+}
+
+Bool
+BitmapXlfd::AddEncoding( const Xlfd *pXlfd )
+{
+ if ( mnEncodings == 0 )
+ {
+ mnPixelSize = pXlfd->mnPixelSize;
+ mnPointSize = pXlfd->mnPointSize;
+ mnAverageWidth = pXlfd->mnAverageWidth;
+ }
+
+ return ExtendedXlfd::AddEncoding( pXlfd );
+}
+
+void
+BitmapXlfd::ToString( ByteString &rString,
+ unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const
+{
+ int nIdx = GetEncodingIdx( nEncoding );
+ if ( nIdx < 0 )
+ return;
+
+ ExtendedXlfd::ToString( rString, nPixelSize, nEncoding );
+ EncodingInfo& rInfo = mpEncodingInfo[ nIdx ];
+
+ AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString );
+
+ rString += '-';
+ rString += ByteString::CreateFromInt32( mnPixelSize );
+ rString += "-";
+ rString += ByteString::CreateFromInt32( mnPointSize );
+ rString += "-";
+ rString += ByteString::CreateFromInt32( rInfo.mnResolutionX );
+ rString += '-';
+ rString += ByteString::CreateFromInt32( rInfo.mnResolutionY );
+ rString += '-';
+ rString += rInfo.mcSpacing;
+ rString += '-';
+ rString += ByteString::CreateFromInt32( mnAverageWidth );
+
+ AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString );
+}
+
+void
+BitmapXlfd::ToImplFontData( ImplFontData *pFontData ) const
+{
+ ExtendedXlfd::ToImplFontData( pFontData );
+
+ pFontData->meType = TYPE_RASTER;
+ pFontData->mnWidth = 0;
+ pFontData->mnHeight = mnPixelSize;
+ pFontData->mnQuality= 256;
+}
+
+
+// ------ class to handle true scalable fonts --------------------------------
+
+ScalableXlfd::ScalableXlfd()
+{
+}
+
+ScalableXlfd::~ScalableXlfd()
+{
+}
+
+void
+ScalableXlfd::ToString( ByteString &rString,
+ unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const
+{
+ int nIdx = GetEncodingIdx( nEncoding );
+ if ( nIdx < 0 )
+ return;
+
+ ExtendedXlfd::ToString( rString, nPixelSize, nEncoding);
+
+ EncodingInfo& rInfo = mpEncodingInfo[ nIdx ];
+ AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString );
+
+ rString += '-';
+ rString += ByteString::CreateFromInt32( nPixelSize );
+ rString += "-0-0-0-";
+ rString += rInfo.mcSpacing;
+ rString += "-0";
+
+ AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString );
+}
+
+void
+ScalableXlfd::ToImplFontData( ImplFontData *pFontData ) const
+{
+ ExtendedXlfd::ToImplFontData( pFontData );
+
+ pFontData->meType = TYPE_SCALABLE;
+ pFontData->mnWidth = 0;
+ pFontData->mnHeight = 0;
+ pFontData->mnQuality= 1024;
+}
+
+// ------ printer fonts ---------------------------------------------------
+
+PrinterFontXlfd::PrinterFontXlfd( )
+{
+}
+
+PrinterFontXlfd::~PrinterFontXlfd( )
+{
+}
+
+Bool
+PrinterFontXlfd::AddEncoding( const Xlfd *pXlfd )
+{
+ rtl_TextEncoding nEncoding = pXlfd->GetEncoding();
+ int nEncodingIdx = GetEncodingIdx( nEncoding );
+
+ if ( nEncodingIdx == -1 )
+ {
+ // the encoding is new, so add it anyway
+ return ExtendedXlfd::AddEncoding( pXlfd );
+ }
+ else
+ {
+ // we already have this encoding, check if we can replace
+ // a soft font with a builtin font
+ EncodingInfo& rInfo = mpEncodingInfo[ nEncodingIdx ];
+ XlfdFonttype nNewType, nOldType;
+
+ nOldType = rInfo.mnResolutionX == 0 && rInfo.mnResolutionY == 0 ?
+ eTypePrinterDownload : eTypePrinterBuiltIn;
+ nNewType = pXlfd->Fonttype();
+
+ if ( nOldType == eTypePrinterDownload
+ && nNewType == eTypePrinterBuiltIn )
+ {
+ mpEncodingInfo[ nEncodingIdx ] = pXlfd;
+ }
+ return True;
+ }
+
+ return False;
+}
+
+// ------ font list -------------------------------------------------------
+
+void
+XlfdStorage::Dispose()
+{
+ for ( int i = 0; i < mnCount; i++ )
+ delete mpList[i];
+ if ( mnSize != 0 )
+ delete mpList;
+
+ mnCount = 0;
+ mnSize = 0;
+ mpList = NULL;
+}
+
+void
+XlfdStorage::Reset()
+{
+ mnCount = 0;
+}
+
+XlfdStorage::~XlfdStorage()
+{
+ if ( mnSize != 0 )
+ delete mpList;
+}
+
+XlfdStorage::XlfdStorage() :
+ mnCount( 0 ),
+ mnSize( 0 ),
+ mpList( NULL )
+{
+}
+
+void
+XlfdStorage::Enlarge()
+{
+ if ( mnSize == 0 )
+ mnSize = 8;
+ else
+ mnSize = mnSize < 32768 ? (mnSize * 2) : 65535;
+
+ mpList = (const ExtendedXlfd**)Realloc(mpList, mnSize * sizeof(ExtendedXlfd*));
+}
+
+void
+XlfdStorage::Add( const ExtendedXlfd* pXlfd )
+{
+ if ( pXlfd == NULL )
+ return;
+
+ if ( mnCount >= mnSize )
+ Enlarge();
+ mpList[ mnCount++ ] = pXlfd;
+}
+
+void
+XlfdStorage::Add( const XlfdStorage* pXlfd )
+{
+ if ( pXlfd == NULL )
+ return;
+
+ if ( pXlfd->mnCount != 0 )
+ {
+ unsigned short nNeeded = mnCount + pXlfd->mnCount;
+ if ( mnSize <= nNeeded )
+ {
+ if ( mnSize == 0 )
+ mnSize = pXlfd->mnSize;
+ while ( mnSize <= nNeeded )
+ mnSize = mnSize < 32768 ? (mnSize * 2) : 65535;
+ mpList = (const ExtendedXlfd**)Realloc( mpList,
+ mnSize * sizeof(ExtendedXlfd*) );
+ }
+ memcpy( mpList + mnCount, pXlfd->mpList,
+ pXlfd->mnCount * sizeof(ExtendedXlfd*) );
+ mnCount += pXlfd->mnCount;
+ }
+}
+
+#ifdef DEBUG
+void
+XlfdStorage::Dump() const
+{
+ for ( int i = 0; i < mnCount; i++ )
+ {
+ mpList[i]->Dump();
+ fprintf(stderr, "\n" );
+ }
+}
+#endif
+
+const ExtendedXlfd*
+XlfdStorage::Get( int nIdx ) const
+{
+ return nIdx >= 0 && nIdx < mnCount ? mpList[nIdx] : NULL ;
+}
+
+// ------ bitmap font list --------------------------------------------------
+
+void
+BitmapXlfdStorage::AddBitmapFont( const Xlfd *pXlfd )
+{
+ if ( pXlfd == NULL )
+ return;
+
+ unsigned short nSize = pXlfd->mnPixelSize;
+
+ for ( int i = 0; i < mnCount; i++ )
+ if ( nSize == ((BitmapXlfd*)mpList[i])->GetPixelSize() )
+ {
+ const_cast<ExtendedXlfd*>(mpList[i])->AddEncoding( pXlfd );
+ return;
+ }
+ if ( mnCount >= mnSize )
+ Enlarge();
+ mpList[ mnCount ] = new BitmapXlfd();
+ const_cast<ExtendedXlfd*>(mpList[ mnCount ])->AddEncoding( pXlfd );
+ ++mnCount;
+}
+
diff --git a/vcl/unx/source/gdi/xlfd_extd.hxx b/vcl/unx/source/gdi/xlfd_extd.hxx
new file mode 100644
index 000000000000..96197177eb33
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_extd.hxx
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_extd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef XLFD_EXTENDED_HXX
+#define XLFD_EXTENDED_HXX
+
+#ifndef _SALUNX_H
+#include <salunx.h>
+#endif
+#ifndef _VCL_VCLENUM_HXX
+#include <enum.hxx>
+#endif
+
+class Xlfd;
+class AttributeProvider;
+class ImplFontData;
+class ByteString;
+
+// --------------------------------------------------------------------------
+//
+// classes for Xlfd handling that contain more than a single encoding.
+// Members that may vary through different encodings are stored in
+// a mpEncodingInfo member. There are three different classes:
+// true scalable fonts (truetype and type1) scalable bitmap fonts
+// (the ugly ones) and bitmap fonts. The ExtendedXlfd stores all the members
+// that are specific to a font outline
+// ( e.g. adobe-times-roman-medium-r-normal- * -p- * )
+// and specifies the interface.
+//
+// --------------------------------------------------------------------------
+
+// base class
+
+class ExtendedXlfd {
+
+ public:
+ ExtendedXlfd();
+ virtual ~ExtendedXlfd();
+ virtual Bool AddEncoding( const Xlfd *pXlfd );
+ Bool HasEncoding( rtl_TextEncoding nEncoding ) const;
+ int GetEncodingIdx( rtl_TextEncoding nEncoding ) const;
+ unsigned short NumEncodings() const
+ { return mnEncodings; }
+ virtual void ToString( ByteString &rString,
+ unsigned short nPixelSize,
+ rtl_TextEncoding nEncoding ) const ;
+ virtual void ToImplFontData( ImplFontData *pFontData ) const ;
+ virtual FontType GetFontType() const
+ { return TYPE_DONTKNOW; }
+ FontFamily GetFamily() const;
+ FontWeight GetWeight() const;
+ FontItalic GetItalic() const;
+ FontWidth GetWidth() const;
+ virtual FontPitch GetSpacing() const;
+ virtual FontPitch GetSpacing( rtl_TextEncoding nEnc ) const;
+ rtl_TextEncoding GetAsciiEncoding( int *pAsciiRange = NULL ) const;
+ rtl_TextEncoding GetEncoding() const;
+ rtl_TextEncoding GetEncoding( int i ) const;
+
+ #ifdef DEBUG
+ void Dump() const;
+ #endif
+
+ protected:
+
+ AttributeProvider* mpFactory;
+
+ unsigned short mnFoundry;
+ unsigned short mnFamily;
+ unsigned short mnWeight;
+ unsigned short mnSlant;
+ unsigned short mnSetwidth;
+
+ unsigned short mnEncodings;
+ struct EncodingInfo {
+ unsigned char mcSpacing;
+ unsigned short mnResolutionX;
+ unsigned short mnResolutionY;
+ unsigned short mnAddstyle;
+ unsigned short mnCharset;
+
+ rtl_TextEncoding mnEncoding;
+
+ EncodingInfo& operator= ( const Xlfd *pXlfd );
+ } *mpEncodingInfo;
+};
+
+// class to handle scalable bitmap fonts
+
+class ScalableBitmapXlfd : public ExtendedXlfd {
+
+ public:
+ ScalableBitmapXlfd();
+ virtual ~ScalableBitmapXlfd();
+ virtual void ToString( ByteString &rString,
+ unsigned short nPixelSize,
+ rtl_TextEncoding nEncoding ) const;
+ virtual void ToImplFontData( ImplFontData *pFontData ) const;
+ virtual FontType GetFontType() const
+ { return TYPE_SCALABLE; }
+};
+
+// class to handle true bitmap fonts
+
+class BitmapXlfd : public ExtendedXlfd {
+
+ public:
+ BitmapXlfd();
+ ~BitmapXlfd();
+ Bool AddEncoding( const Xlfd *pXlfd );
+ unsigned short GetPixelSize() const
+ { return mnPixelSize; }
+ virtual void ToString( ByteString &rString,
+ unsigned short nPixelSize,
+ rtl_TextEncoding nEncoding ) const;
+ virtual void ToImplFontData( ImplFontData *pFontData ) const ;
+ virtual FontType GetFontType() const
+ { return TYPE_RASTER; }
+ protected:
+
+ unsigned short mnPixelSize;
+ unsigned short mnPointSize;
+ unsigned short mnAverageWidth;
+};
+
+// class to handle true scalable fonts
+
+class ScalableXlfd : public ExtendedXlfd {
+
+ public:
+ ScalableXlfd();
+ virtual ~ScalableXlfd();
+ virtual void ToString( ByteString &rString,
+ unsigned short nPixelSize,
+ rtl_TextEncoding nEncoding ) const;
+
+ virtual void ToImplFontData( ImplFontData *pFontData ) const ;
+ virtual FontType GetFontType() const
+ { return TYPE_SCALABLE; }
+};
+
+// class to handle printer resident and printer downloadable fonts
+// printer font xlfd look like scalable bitmap fonts but behave a
+// little bit different
+
+class PrinterFontXlfd : public ScalableBitmapXlfd {
+
+ public:
+ PrinterFontXlfd();
+ virtual ~PrinterFontXlfd();
+ virtual Bool AddEncoding( const Xlfd *pXlfd );
+};
+
+// class to maintain a list of fonts ( bitmap and scalable )
+
+class XlfdStorage {
+
+ public:
+ XlfdStorage();
+ ~XlfdStorage();
+
+ void Dispose();
+ void Reset();
+
+ void Add( const ExtendedXlfd *pXlfd );
+ void Add( const XlfdStorage *pXlfd );
+ unsigned short GetCount() const
+ { return mnCount; }
+ const ExtendedXlfd* Get(int nIdx) const;
+ #ifdef DEBUG
+ void Dump() const ;
+ #endif
+
+ protected:
+
+ void Enlarge();
+
+ unsigned short mnCount;
+ unsigned short mnSize;
+ const ExtendedXlfd**
+ mpList;
+};
+
+// list of fonts specific for bitmap fonts
+
+class BitmapXlfdStorage : public XlfdStorage {
+
+ public:
+
+ void AddBitmapFont( const Xlfd *pXlfd );
+};
+
+#endif /* XLFD_EXTENDED_HXX */
+
diff --git a/vcl/unx/source/gdi/xlfd_smpl.cxx b/vcl/unx/source/gdi/xlfd_smpl.cxx
new file mode 100644
index 000000000000..e2ef73f59747
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_smpl.cxx
@@ -0,0 +1,285 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_smpl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#ifndef XLFD_ATTRIBUTE_HXX
+#include "xlfd_attr.hxx"
+#endif
+#ifndef XLFD_SIMPLE_HXX
+#include "xlfd_smpl.hxx"
+#endif
+
+// --------------------------------------------------------------------------
+//
+//
+// broken down structure equivalent to a Xlfd string
+//
+//
+// --------------------------------------------------------------------------
+
+Xlfd::Xlfd()
+{
+}
+
+// XlfdCompare abi has to be qsort(3) compatible, the sorting result must
+// guarantee that fonts with SameFontoutline() are successive
+// XlfdCompare relies on vFrom->mpFactory eq vTo->mpFactory. Since comparing
+// Xlfd's is done by comparing attributes there is no way around this.
+extern "C" int
+XlfdCompare( const void *vFrom, const void *vTo )
+{
+ const Xlfd *pFrom = (Xlfd*)vFrom;
+ const Xlfd *pTo = (Xlfd*)vTo;
+
+ // Compare outline description
+ if ( pFrom->mnFoundry != pTo->mnFoundry )
+ return (int)pFrom->mnFoundry - (int)pTo->mnFoundry;
+ if ( pFrom->mnFamily != pTo->mnFamily )
+ return (int)pFrom->mnFamily - (int)pTo->mnFamily;
+ if ( pFrom->mnWeight != pTo->mnWeight )
+ return (int)pFrom->mnWeight - (int)pTo->mnWeight;
+ if ( pFrom->mnSlant != pTo->mnSlant )
+ return (int)pFrom->mnSlant - (int)pTo->mnSlant;
+ if ( pFrom->mnSetwidth != pTo->mnSetwidth )
+ return (int)pFrom->mnSetwidth - (int)pTo->mnSetwidth;
+
+ // Addstyle name is futile tricky. it may contain encoding information
+ // (like "ansi_1251") which Compares equal, or it may contain style
+ // information (like "serif") which Compares unequal
+ if ( pFrom->mnAddstyle == pTo->mnAddstyle )
+ return 0;
+
+ AttributeProvider *pFactory = pFrom->mpFactory;
+ Attribute *pFromAttr = pFactory->RetrieveAddstyle( pFrom->mnAddstyle );
+ Attribute *pToAttr = pFactory->RetrieveAddstyle( pTo->mnAddstyle );
+
+ // if both addstyles denote encodings or if one denotes an
+ // encoding and the other denotes a style which really
+ // duplicates weight and slant information
+
+ int nFromCompare = (pFromAttr->GetValue() != RTL_TEXTENCODING_DONTKNOW)
+ || (pFromAttr->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ?
+ -1 : pFrom->mnAddstyle;
+ int nToCompare = (pToAttr->GetValue() != RTL_TEXTENCODING_DONTKNOW)
+ || (pToAttr->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ?
+ -1 : pTo->mnAddstyle;
+
+ return nFromCompare - nToCompare;
+}
+
+// check whether two fonts are identical as appearance is concerned
+// this does not Compare the actual scaling of two fonts
+Bool
+Xlfd::SameFontoutline( const Xlfd* pComparedTo ) const
+{
+ void* pThis = (void*)this;
+ return XlfdCompare( (void*)pThis, (void*)pComparedTo ) == 0 ;
+}
+
+unsigned short
+Xlfd::GetEncoding() const
+{
+ Attribute *pAddstyle = mpFactory->RetrieveAddstyle( mnAddstyle );
+ if ( pAddstyle->GetValue() != RTL_TEXTENCODING_DONTKNOW )
+ return pAddstyle->GetValue();
+
+ Attribute *pEncoding = mpFactory->RetrieveCharset( mnCharset );
+ return pEncoding->GetValue();
+}
+
+XlfdFonttype
+Xlfd::Fonttype() const
+{
+ if ( (mnAverageWidth == 0) && (mnPixelSize == 0) && (mnPointSize == 0) )
+ {
+ if ( (mnResolutionX == 0) && (mnResolutionY == 0) )
+ return mpFactory->GetDevice() == eDevicePrinter ?
+ eTypePrinterDownload : eTypeScalable;
+ else
+ return mpFactory->GetDevice() == eDevicePrinter ?
+ eTypePrinterBuiltIn : eTypeScalableBitmap;
+ }
+
+ return mpFactory->GetDevice() == eDevicePrinter ?
+ eTypeUnknown : eTypeBitmap;
+}
+
+void
+Advance( const char** pFrom, const char** pTo )
+{
+ const char *pTmp = *pTo;
+
+ for( ; (*pTmp != '\0') && (*pTmp++ != '-'); )
+ {}
+ *pFrom = *pTo;
+ *pTo = pTmp;
+}
+
+// this is the real workhorse function. Since this is called for every font
+// in the fontpath it has to be as fast a possible
+Bool
+Xlfd::FromString( const char* pXlfdstring, AttributeProvider *pFactory )
+{
+ mpFactory = pFactory;
+
+ const char* pTo;
+ const char* pFrom;
+
+ pFrom = pXlfdstring;
+ // first char must be '-'
+ if(*pFrom++ != '-')
+ return False;
+
+ pTo = pFrom;
+
+ Advance( &pFrom, &pTo ); //-foundry-*
+ mnFoundry = mpFactory->InsertFoundry( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); // -*-family-*
+ mnFamily = mpFactory->InsertFamily( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); // -*-*-weight-*
+ mnWeight = mpFactory->InsertWeight( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-slant-*
+ mnSlant = mpFactory->InsertSlant( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-setwidth-*
+ mnSetwidth = mpFactory->InsertSetwidth( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-Addstyle-*
+ mnAddstyle = mpFactory->InsertAddstyle( pFrom, pTo - pFrom - 1 );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-height-*
+ mnPixelSize = atoi( pFrom );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-pt height-*
+ mnPointSize = atoi( pFrom );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-x resolution-*
+ mnResolutionX = atoi( pFrom );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-y resolution-*
+ mnResolutionY = atoi( pFrom );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-spacing-*
+ mcSpacing = pFrom == pTo ? '\0' : *pFrom;
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-*-average-*
+ mnAverageWidth = atoi( pFrom );
+
+ Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-*-*-registry-encoding
+ const char* pTmp = pFrom;
+ Advance( &pTmp, &pTo );
+ mnCharset = mpFactory->InsertCharset( pFrom, pTo - pFrom );
+
+ // sanity check whether we have really found a valid XLFD, if not
+ // throw away the whole font, since we have no idea what parts of
+ // the XLFD contains the error.
+ if ( !(pTo > pFrom) )
+ return False;
+
+ // a non-empty family name is essential, since otherwise the font
+ // would match the "default font" #52299#
+ Attribute* pFamily = mpFactory->RetrieveFamily( mnFamily );
+ const char* pFamilyName = pFamily->GetName();
+ if ( pFamilyName[0] == '\0' )
+ return False;
+
+ // well done
+ return True;
+}
+
+#ifdef DEBUG
+// pure debug for now: this is only to inspect/pretty print a Xlfd struct
+const char*
+Xlfd::ToString( ByteString &rString ) const
+{
+ AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString );
+ AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
+ AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
+ AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString );
+
+ rString += '-'; rString += ByteString::CreateFromInt32( mnPixelSize );
+ rString += '-'; rString += ByteString::CreateFromInt32( mnPointSize );
+ rString += '-'; rString += ByteString::CreateFromInt32( mnResolutionX );
+ rString += '-'; rString += ByteString::CreateFromInt32( mnResolutionY );
+ rString += '-'; rString += mcSpacing;
+ rString += '-'; rString += ByteString::CreateFromInt32( mnAverageWidth );
+
+ AppendAttribute( mpFactory->RetrieveCharset(mnCharset), rString );
+
+ return rString.GetBuffer() ;
+}
+
+void
+Xlfd::Dump() const
+{
+ ByteString aString;
+ fprintf(stderr, "Xlfd: %s\n", ToString(aString) );
+}
+#endif
+
diff --git a/vcl/unx/source/gdi/xlfd_smpl.hxx b/vcl/unx/source/gdi/xlfd_smpl.hxx
new file mode 100644
index 000000000000..923f542d3d15
--- /dev/null
+++ b/vcl/unx/source/gdi/xlfd_smpl.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlfd_smpl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef XLFD_SIMPLE_HXX
+#define XLFD_SIMPLE_HXX
+
+#ifndef _SALUNX_H
+#include <salunx.h>
+#endif
+#ifndef _VCL_VCLENUM_HXX
+#include <vclenum.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+class AttributeProvider;
+
+// --------------------------------------------------------------------------
+//
+//
+// broken down structure equivalent to a Xlfd string
+//
+//
+// --------------------------------------------------------------------------
+
+enum XlfdFonttype {
+ eTypeUnknown = TYPE_DONTKNOW,
+ eTypeBitmap = TYPE_RASTER,
+ eTypeScalableBitmap = TYPE_VECTOR,
+ eTypeScalable = TYPE_SCALABLE,
+ eTypePrinterBuiltIn,
+ eTypePrinterDownload
+};
+
+class Xlfd {
+
+ public:
+
+ unsigned short mnFoundry;
+ unsigned short mnFamily;
+ unsigned short mnWeight;
+ unsigned short mnSlant;
+ unsigned short mnSetwidth;
+ unsigned short mnAddstyle;
+ unsigned short mnPixelSize;
+ unsigned short mnPointSize;
+ unsigned short mnResolutionX;
+ unsigned short mnResolutionY;
+ unsigned char mcSpacing;
+ unsigned short mnAverageWidth;
+ unsigned short mnCharset;
+
+ // all foundry, family, weight ... information referres
+ // to this factory
+ AttributeProvider *mpFactory;
+
+ public:
+ Xlfd();
+ Bool FromString( const char* pXlfdstring,
+ AttributeProvider *pFactory );
+ Bool SameFontoutline( const Xlfd *pComparedTo ) const ;
+ XlfdFonttype Fonttype() const ;
+ unsigned short GetEncoding() const ;
+ #ifdef DEBUG
+ const char* ToString( ByteString &rString ) const ;
+ void Dump() const;
+ #endif
+};
+
+extern "C" int
+XlfdCompare( const void *vFrom, const void *vTo );
+
+#endif /* XLFD_SIMPLE_HXX */
+
diff --git a/vcl/unx/source/inc/airbrush_curs.h b/vcl/unx/source/inc/airbrush_curs.h
new file mode 100644
index 000000000000..0cee6ff80441
--- /dev/null
+++ b/vcl/unx/source/inc/airbrush_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: airbrush_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define airbrush_curs_width 32
+#define airbrush_curs_height 32
+#define airbrush_curs_x_hot 5
+#define airbrush_curs_y_hot 22
+static char airbrush_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
+ 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00,
+ 0xcc,0x07,0x00,0x00,0xb4,0x03,0x00,0x00,0x10,0x01,0x00,0x00,0x88,0x00,0x00,
+ 0x00,0x44,0x00,0x00,0x00,0x62,0x60,0x00,0x00,0x91,0x10,0x00,0x80,0x88,0x10,
+ 0x00,0x40,0x04,0x09,0x00,0x40,0x02,0x06,0x00,0xa0,0x01,0x00,0x00,0x60,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/airbrush_mask.h b/vcl/unx/source/inc/airbrush_mask.h
new file mode 100644
index 000000000000..3192d0ec2a74
--- /dev/null
+++ b/vcl/unx/source/inc/airbrush_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: airbrush_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define airbrush_mask_width 32
+#define airbrush_mask_height 32
+#define airbrush_mask_x_hot 5
+#define airbrush_mask_y_hot 22
+static char airbrush_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
+ 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00,
+ 0xcc,0x07,0x00,0x00,0xf4,0x03,0x00,0x00,0xf0,0x01,0x00,0x00,0xf8,0x00,0x00,
+ 0x00,0x7c,0x00,0x00,0x00,0x7e,0x60,0x00,0x00,0x9f,0x10,0x00,0x80,0x8f,0x10,
+ 0x00,0xc0,0x07,0x09,0x00,0xc0,0x03,0x06,0x00,0xe0,0x01,0x00,0x00,0x60,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/ase_curs.h b/vcl/unx/source/inc/ase_curs.h
new file mode 100644
index 000000000000..71387399b3c2
--- /dev/null
+++ b/vcl/unx/source/inc/ase_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: ase_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ase_curs_width 32
+#define ase_curs_height 32
+#define ase_curs_x_hot 19
+#define ase_curs_y_hot 16
+static char ase_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x1c,0x0e,
+ 0x00,0x00,0x3e,0x1e,0x00,0x00,0x3e,0x7e,0x00,0x00,0x3e,0x1e,0x00,0x00,0x1c,
+ 0x0e,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/ase_mask.h b/vcl/unx/source/inc/ase_mask.h
new file mode 100644
index 000000000000..bdd084127371
--- /dev/null
+++ b/vcl/unx/source/inc/ase_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: ase_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ase_mask_width 32
+#define ase_mask_height 32
+#define ase_mask_x_hot 19
+#define ase_mask_y_hot 16
+static char ase_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x9c,0x0f,0x00,0x00,0x3e,0x1f,
+ 0x00,0x00,0x7f,0x7f,0x00,0x00,0x7f,0xff,0x00,0x00,0x7f,0x7f,0x00,0x00,0x3e,
+ 0x1f,0x00,0x00,0x9c,0x0f,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asn_curs.h b/vcl/unx/source/inc/asn_curs.h
new file mode 100644
index 000000000000..c81b50f0bbee
--- /dev/null
+++ b/vcl/unx/source/inc/asn_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asn_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asn_curs_width 32
+#define asn_curs_height 32
+#define asn_curs_x_hot 16
+#define asn_curs_y_hot 12
+static char asn_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03,
+ 0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0x20,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00,
+ 0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asn_mask.h b/vcl/unx/source/inc/asn_mask.h
new file mode 100644
index 000000000000..a711a43aced6
--- /dev/null
+++ b/vcl/unx/source/inc/asn_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asn_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asn_mask_width 32
+#define asn_mask_height 32
+#define asn_mask_x_hot 16
+#define asn_mask_y_hot 12
+static char asn_mask_bits[] = {
+ 0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,
+ 0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xf0,0x1f,0x00,0x00,0xf0,
+ 0x1f,0x00,0x00,0x20,0x08,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,
+ 0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0,0x07,0x00,
+ 0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asne_curs.h b/vcl/unx/source/inc/asne_curs.h
new file mode 100644
index 000000000000..2463803a8fb7
--- /dev/null
+++ b/vcl/unx/source/inc/asne_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asne_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asne_curs_width 32
+#define asne_curs_height 32
+#define asne_curs_x_hot 21
+#define asne_curs_y_hot 10
+static char asne_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x80,
+ 0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x1c,0x00,0x00,
+ 0x00,0x1c,0x00,0x00,0x70,0x18,0x00,0x00,0xf8,0x08,0x00,0x00,0xf8,0x00,0x00,
+ 0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asne_mask.h b/vcl/unx/source/inc/asne_mask.h
new file mode 100644
index 000000000000..1d59c3009dec
--- /dev/null
+++ b/vcl/unx/source/inc/asne_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asne_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asne_mask_width 32
+#define asne_mask_height 32
+#define asne_mask_x_hot 21
+#define asne_mask_y_hot 10
+static char asne_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x80,0x7f,0x00,0x00,0xc0,
+ 0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x00,0x3f,0x00,0x00,
+ 0x70,0x3e,0x00,0x00,0xf8,0x3c,0x00,0x00,0xfc,0x1d,0x00,0x00,0xfc,0x09,0x00,
+ 0x00,0xfc,0x01,0x00,0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asns_curs.h b/vcl/unx/source/inc/asns_curs.h
new file mode 100644
index 000000000000..9b459efc1dee
--- /dev/null
+++ b/vcl/unx/source/inc/asns_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asns_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asns_curs_width 32
+#define asns_curs_height 32
+#define asns_curs_x_hot 15
+#define asns_curs_y_hot 15
+static char asns_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,
+ 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,
+ 0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,
+ 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asns_mask.h b/vcl/unx/source/inc/asns_mask.h
new file mode 100644
index 000000000000..377687fdf2b2
--- /dev/null
+++ b/vcl/unx/source/inc/asns_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asns_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asns_mask_width 32
+#define asns_mask_height 32
+#define asns_mask_x_hot 15
+#define asns_mask_y_hot 15
+static char asns_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,
+ 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,
+ 0x10,0x04,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,
+ 0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,
+ 0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0,
+ 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,
+ 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asnswe_curs.h b/vcl/unx/source/inc/asnswe_curs.h
new file mode 100644
index 000000000000..e6c871fed4e5
--- /dev/null
+++ b/vcl/unx/source/inc/asnswe_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asnswe_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asnswe_curs_width 32
+#define asnswe_curs_height 32
+#define asnswe_curs_x_hot 15
+#define asnswe_curs_y_hot 15
+static char asnswe_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,
+ 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01,
+ 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,
+ 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asnswe_mask.h b/vcl/unx/source/inc/asnswe_mask.h
new file mode 100644
index 000000000000..22c910a1a9a7
--- /dev/null
+++ b/vcl/unx/source/inc/asnswe_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asnswe_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asnswe_mask_width 32
+#define asnswe_mask_height 32
+#define asnswe_mask_x_hot 15
+#define asnswe_mask_y_hot 15
+static char asnswe_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,
+ 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,
+ 0x16,0x34,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07,
+ 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9,
+ 0x00,0x00,0x16,0x34,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0,
+ 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,
+ 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asnw_curs.h b/vcl/unx/source/inc/asnw_curs.h
new file mode 100644
index 000000000000..9961547d6378
--- /dev/null
+++ b/vcl/unx/source/inc/asnw_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asnw_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asnw_curs_width 32
+#define asnw_curs_height 32
+#define asnw_curs_x_hot 10
+#define asnw_curs_y_hot 10
+static char asnw_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xfc,0x01,0x00,
+ 0x00,0xfc,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,
+ 0x00,0x00,0x18,0x0e,0x00,0x00,0x10,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,
+ 0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asnw_mask.h b/vcl/unx/source/inc/asnw_mask.h
new file mode 100644
index 000000000000..b824f9287e58
--- /dev/null
+++ b/vcl/unx/source/inc/asnw_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asnw_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asnw_mask_width 32
+#define asnw_mask_height 32
+#define asnw_mask_x_hot 10
+#define asnw_mask_y_hot 10
+static char asnw_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfe,0x03,0x00,
+ 0x00,0xfe,0x07,0x00,0x00,0xfe,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x7c,0x0e,
+ 0x00,0x00,0x3c,0x1f,0x00,0x00,0xb8,0x3f,0x00,0x00,0x90,0x3f,0x00,0x00,0x80,
+ 0x3f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/ass_curs.h b/vcl/unx/source/inc/ass_curs.h
new file mode 100644
index 000000000000..47da8c925589
--- /dev/null
+++ b/vcl/unx/source/inc/ass_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: ass_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ass_curs_width 32
+#define ass_curs_height 32
+#define ass_curs_x_hot 15
+#define ass_curs_y_hot 19
+static char ass_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,
+ 0x00,0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,
+ 0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/ass_mask.h b/vcl/unx/source/inc/ass_mask.h
new file mode 100644
index 000000000000..951e8dd72c88
--- /dev/null
+++ b/vcl/unx/source/inc/ass_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: ass_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ass_mask_width 32
+#define ass_mask_height 32
+#define ass_mask_x_hot 15
+#define ass_mask_y_hot 19
+static char ass_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,
+ 0x00,0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,
+ 0x01,0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,
+ 0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,
+ 0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00};
diff --git a/vcl/unx/source/inc/asse_curs.h b/vcl/unx/source/inc/asse_curs.h
new file mode 100644
index 000000000000..763756e8c833
--- /dev/null
+++ b/vcl/unx/source/inc/asse_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asse_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asse_curs_width 32
+#define asse_curs_height 32
+#define asse_curs_x_hot 21
+#define asse_curs_y_hot 21
+static char asse_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0xf8,0x08,0x00,0x00,0x70,0x18,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x1c,0x00,
+ 0x00,0x00,0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0x3c,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asse_mask.h b/vcl/unx/source/inc/asse_mask.h
new file mode 100644
index 000000000000..3e80ed64250c
--- /dev/null
+++ b/vcl/unx/source/inc/asse_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asse_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asse_mask_width 32
+#define asse_mask_height 32
+#define asse_mask_x_hot 21
+#define asse_mask_y_hot 21
+static char asse_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,
+ 0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0xfc,0x09,0x00,0x00,
+ 0xfc,0x1d,0x00,0x00,0xf8,0x3c,0x00,0x00,0x70,0x3e,0x00,0x00,0x00,0x3f,0x00,
+ 0x00,0xc0,0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x80,0x7f,
+ 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/assw_curs.h b/vcl/unx/source/inc/assw_curs.h
new file mode 100644
index 000000000000..7ee6d3bf02e3
--- /dev/null
+++ b/vcl/unx/source/inc/assw_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: assw_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define assw_curs_width 32
+#define assw_curs_height 32
+#define assw_curs_x_hot 21
+#define assw_curs_y_hot 21
+static char assw_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f,
+ 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc,
+ 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/assw_mask.h b/vcl/unx/source/inc/assw_mask.h
new file mode 100644
index 000000000000..4f184f717cd1
--- /dev/null
+++ b/vcl/unx/source/inc/assw_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: assw_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define assw_mask_width 32
+#define assw_mask_height 32
+#define assw_mask_x_hot 21
+#define assw_mask_y_hot 21
+static char assw_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f,
+ 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc,
+ 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asw_curs.h b/vcl/unx/source/inc/asw_curs.h
new file mode 100644
index 000000000000..33c77e76fb6e
--- /dev/null
+++ b/vcl/unx/source/inc/asw_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asw_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asw_curs_width 32
+#define asw_curs_height 32
+#define asw_curs_x_hot 12
+#define asw_curs_y_hot 15
+static char asw_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x70,0x38,0x00,0x00,0x78,0x7c,0x00,0x00,
+ 0x7e,0x7c,0x00,0x00,0x78,0x7c,0x00,0x00,0x70,0x38,0x00,0x00,0xc0,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/asw_mask.h b/vcl/unx/source/inc/asw_mask.h
new file mode 100644
index 000000000000..11a227508627
--- /dev/null
+++ b/vcl/unx/source/inc/asw_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: asw_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define asw_mask_width 32
+#define asw_mask_height 32
+#define asw_mask_x_hot 12
+#define asw_mask_y_hot 15
+static char asw_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
+ 0x00,0x00,0x00,0xf0,0x39,0x00,0x00,0xf8,0x7c,0x00,0x00,0xfe,0xfe,0x00,0x00,
+ 0xff,0xfe,0x00,0x00,0xfe,0xfe,0x00,0x00,0xf8,0x7c,0x00,0x00,0xf0,0x39,0x00,
+ 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/aswe_curs.h b/vcl/unx/source/inc/aswe_curs.h
new file mode 100644
index 000000000000..76bf92ed9e9e
--- /dev/null
+++ b/vcl/unx/source/inc/aswe_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: aswe_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define aswe_curs_width 32
+#define aswe_curs_height 32
+#define aswe_curs_x_hot 15
+#define aswe_curs_y_hot 15
+static char aswe_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01,
+ 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/aswe_mask.h b/vcl/unx/source/inc/aswe_mask.h
new file mode 100644
index 000000000000..ef2f2043e30a
--- /dev/null
+++ b/vcl/unx/source/inc/aswe_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: aswe_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define aswe_mask_width 32
+#define aswe_mask_height 32
+#define aswe_mask_x_hot 15
+#define aswe_mask_y_hot 15
+static char aswe_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x06,0x30,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07,
+ 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9,
+ 0x00,0x00,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chain_curs.h b/vcl/unx/source/inc/chain_curs.h
new file mode 100644
index 000000000000..6ec19fc917f6
--- /dev/null
+++ b/vcl/unx/source/inc/chain_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: chain_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chain_curs_width 32
+#define chain_curs_height 32
+#define chain_curs_x_hot 0
+#define chain_curs_y_hot 2
+static char chain_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,
+ 0x00,0x05,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x21,0x00,
+ 0x00,0x00,0x41,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x01,
+ 0x02,0x00,0x00,0x01,0x04,0x00,0x00,0x81,0x0f,0x00,0x00,0x91,0x00,0x00,0x00,
+ 0x99,0x00,0x00,0x00,0x25,0x01,0x00,0x00,0x23,0x01,0x00,0x00,0x41,0x3e,0xbf,
+ 0x0f,0x40,0x82,0x40,0x10,0x80,0x5c,0xae,0x23,0x80,0x24,0x91,0x24,0x00,0x23,
+ 0x91,0x28,0x80,0x24,0x91,0x28,0x80,0x24,0x91,0x24,0x80,0x98,0x4f,0x23,0x00,
+ 0x41,0x20,0x10,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chain_mask.h b/vcl/unx/source/inc/chain_mask.h
new file mode 100644
index 000000000000..f03eaf6a611c
--- /dev/null
+++ b/vcl/unx/source/inc/chain_mask.h
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: chain_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chain_mask_width 32
+#define chain_mask_height 32
+static char chain_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,
+ 0x00,0x07,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x3f,0x00,
+ 0x00,0x00,0x7f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0xff,
+ 0x03,0x00,0x00,0xff,0x07,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xe7,0x01,0x00,0x00,0xe3,0x01,0x00,0x00,0xc1,0x3f,0xbf,
+ 0x0f,0xc0,0xbf,0xff,0x1f,0x80,0xdf,0xff,0x3f,0x80,0xe7,0xf1,0x3c,0x00,0xe3,
+ 0xf1,0x38,0x80,0xe7,0xf1,0x38,0x80,0xe7,0xf1,0x3c,0x80,0xff,0xff,0x3f,0x00,
+ 0x7f,0xff,0x1f,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chainnot_curs.h b/vcl/unx/source/inc/chainnot_curs.h
new file mode 100644
index 000000000000..1d98fbd89aef
--- /dev/null
+++ b/vcl/unx/source/inc/chainnot_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: chainnot_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chainnot_curs_width 32
+#define chainnot_curs_height 32
+#define chainnot_curs_x_hot 2
+#define chainnot_curs_y_hot 2
+static char chainnot_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xf0,0x00,
+ 0x00,0x38,0xc0,0x01,0x00,0x7c,0x80,0x03,0x00,0xec,0x00,0x03,0x00,0xce,0x01,
+ 0x07,0x00,0x86,0x03,0x06,0x00,0x06,0x07,0x06,0x00,0x06,0x0e,0x06,0x00,0x06,
+ 0x1c,0x06,0x00,0x0e,0x38,0x07,0x00,0x0c,0x70,0x03,0x00,0x1c,0xe0,0x03,0x00,
+ 0x38,0xc0,0x01,0x00,0xf0,0xe0,0x00,0x00,0xe0,0x7f,0x00,0x00,0x80,0x9f,0xfc,
+ 0x3e,0x00,0x00,0x02,0x41,0x00,0x72,0xb9,0x8e,0x00,0x92,0x44,0x92,0x00,0x8c,
+ 0x44,0xa2,0x00,0x92,0x44,0xa2,0x00,0x92,0x44,0x92,0x00,0x62,0x3e,0x8d,0x00,
+ 0x04,0x81,0x40,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chainnot_mask.h b/vcl/unx/source/inc/chainnot_mask.h
new file mode 100644
index 000000000000..38764c143944
--- /dev/null
+++ b/vcl/unx/source/inc/chainnot_mask.h
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: chainnot_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chainnot_mask_width 32
+#define chainnot_mask_height 32
+static char chainnot_mask_bits[] = {
+ 0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xff,0x00,0x00,0xf8,0xff,0x01,
+ 0x00,0xfc,0xf0,0x03,0x00,0xfe,0xc0,0x07,0x00,0xfe,0x81,0x07,0x00,0xff,0x83,
+ 0x0f,0x00,0xcf,0x07,0x0f,0x00,0x8f,0x0f,0x0f,0x00,0x0f,0x1f,0x0f,0x00,0x0f,
+ 0x3e,0x0f,0x00,0x1f,0xfc,0x0f,0x00,0x1e,0xf8,0x07,0x00,0x3e,0xf0,0x07,0x00,
+ 0xfc,0xe0,0x03,0x00,0xf8,0xff,0x01,0x00,0xf0,0xff,0x00,0x00,0xe0,0xff,0xfc,
+ 0x3e,0x80,0xff,0xfe,0x7f,0x00,0x7e,0xff,0xff,0x00,0x9e,0xc7,0xf3,0x00,0x8c,
+ 0xc7,0xe3,0x00,0x9e,0xc7,0xe3,0x00,0x9e,0xc7,0xf3,0x00,0xfe,0xff,0xff,0x00,
+ 0xfc,0xfd,0x7f,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chart_curs.h b/vcl/unx/source/inc/chart_curs.h
new file mode 100644
index 000000000000..7aa676c96cf3
--- /dev/null
+++ b/vcl/unx/source/inc/chart_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: chart_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chart_curs_width 32
+#define chart_curs_height 32
+#define chart_curs_x_hot 15
+#define chart_curs_y_hot 16
+static char chart_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xbf,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,
+ 0x10,0x00,0x00,0x80,0x00,0x06,0x00,0x00,0x10,0x06,0x00,0x00,0x00,0x06,0x00,
+ 0x00,0x10,0x36,0x00,0x00,0xc0,0x36,0x00,0x00,0xd0,0x36,0x00,0x00,0xc0,0x36,
+ 0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/chart_mask.h b/vcl/unx/source/inc/chart_mask.h
new file mode 100644
index 000000000000..0f0b6b37bb3f
--- /dev/null
+++ b/vcl/unx/source/inc/chart_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: chart_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define chart_mask_width 32
+#define chart_mask_height 32
+#define chart_mask_x_hot 15
+#define chart_mask_y_hot 16
+static char chart_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,
+ 0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,
+ 0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x00,0xc0,0x01,
+ 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x39,0x00,0x00,0xc0,
+ 0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0x00,0x38,0x7f,0x00,
+ 0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0xff,
+ 0x00,0x00,0xf8,0xff,0x00,0x00,0xf8,0xff};
diff --git a/vcl/unx/source/inc/copydata_curs.h b/vcl/unx/source/inc/copydata_curs.h
new file mode 100644
index 000000000000..e60620a7c777
--- /dev/null
+++ b/vcl/unx/source/inc/copydata_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copydata_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copydata_curs_width 32
+#define copydata_curs_height 32
+#define copydata_curs_x_hot 1
+#define copydata_curs_y_hot 1
+static char copydata_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00,
+ 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x10, 0xf0, 0x1f, 0x00, 0x08, 0xf0, 0x1f, 0x00, 0x10, 0xf0, 0x1e, 0x00,
+ 0xa8, 0xf2, 0x1e, 0x00, 0x50, 0x35, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00,
+ 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copydata_mask.h b/vcl/unx/source/inc/copydata_mask.h
new file mode 100644
index 000000000000..7b3b86c15030
--- /dev/null
+++ b/vcl/unx/source/inc/copydata_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copydata_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copydata_mask_width 32
+#define copydata_mask_height 32
+#define copydata_mask_x_hot 1
+#define copydata_mask_y_hot 1
+static char copydata_mask_bits[] = {
+ 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00,
+ 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00,
+ 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00,
+ 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copydlnk_curs.h b/vcl/unx/source/inc/copydlnk_curs.h
new file mode 100644
index 000000000000..3e8b1633efc8
--- /dev/null
+++ b/vcl/unx/source/inc/copydlnk_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copydlnk_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copydlnk_curs_width 32
+#define copydlnk_curs_height 32
+#define copydlnk_curs_x_hot 1
+#define copydlnk_curs_y_hot 1
+static char copydlnk_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00,
+ 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
+ 0x30, 0xf1, 0x1f, 0x00, 0x10, 0xf1, 0x1f, 0x00, 0xd0, 0xf1, 0x1e, 0x00,
+ 0xf0, 0xf1, 0x1e, 0x00, 0x00, 0x34, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00,
+ 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copydlnk_mask.h b/vcl/unx/source/inc/copydlnk_mask.h
new file mode 100644
index 000000000000..bd9900fdfe67
--- /dev/null
+++ b/vcl/unx/source/inc/copydlnk_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copydlnk_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copydlnk_mask_width 32
+#define copydlnk_mask_height 32
+#define copydlnk_mask_x_hot 1
+#define copydlnk_mask_y_hot 1
+static char copydlnk_mask_bits[] = {
+ 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00,
+ 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x3f, 0x00,
+ 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00,
+ 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyfile_curs.h b/vcl/unx/source/inc/copyfile_curs.h
new file mode 100644
index 000000000000..f92161e0ec06
--- /dev/null
+++ b/vcl/unx/source/inc/copyfile_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyfile_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyfile_curs_width 32
+#define copyfile_curs_height 32
+#define copyfile_curs_x_hot 9
+#define copyfile_curs_y_hot 9
+static char copyfile_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00,
+ 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00,
+ 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00,
+ 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d,
+ 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d,
+ 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyfile_mask.h b/vcl/unx/source/inc/copyfile_mask.h
new file mode 100644
index 000000000000..af844d3218b2
--- /dev/null
+++ b/vcl/unx/source/inc/copyfile_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyfile_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyfile_mask_width 32
+#define copyfile_mask_height 32
+#define copyfile_mask_x_hot 9
+#define copyfile_mask_y_hot 9
+static char copyfile_mask_bits[] = {
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
+ 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00,
+ 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f,
+ 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f,
+ 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f,
+ 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f,
+ 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyfiles_curs.h b/vcl/unx/source/inc/copyfiles_curs.h
new file mode 100644
index 000000000000..4acfaf38b0db
--- /dev/null
+++ b/vcl/unx/source/inc/copyfiles_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyfiles_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyfiles_curs_width 32
+#define copyfiles_curs_height 32
+#define copyfiles_curs_x_hot 8
+#define copyfiles_curs_y_hot 9
+static char copyfiles_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00,
+ 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00,
+ 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00,
+ 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00,
+ 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00,
+ 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00,
+ 0x00, 0x61, 0xe0, 0x3f, 0x00, 0x60, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3d,
+ 0x00, 0xc0, 0xe0, 0x3d, 0x00, 0x80, 0x61, 0x30, 0x00, 0x80, 0xe1, 0x3d,
+ 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyfiles_mask.h b/vcl/unx/source/inc/copyfiles_mask.h
new file mode 100644
index 000000000000..cec000477d40
--- /dev/null
+++ b/vcl/unx/source/inc/copyfiles_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyfiles_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyfiles_mask_width 32
+#define copyfiles_mask_height 32
+#define copyfiles_mask_x_hot 8
+#define copyfiles_mask_y_hot 9
+static char copyfiles_mask_bits[] = {
+ 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00,
+ 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00,
+ 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xf0, 0x7f,
+ 0x80, 0xff, 0xf0, 0x7f, 0x80, 0xf3, 0xf1, 0x7f, 0x00, 0xf0, 0xf1, 0x7f,
+ 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xc0, 0xf3, 0x7f,
+ 0x00, 0xc0, 0xf3, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f,
+ 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyflnk_curs.h b/vcl/unx/source/inc/copyflnk_curs.h
new file mode 100644
index 000000000000..c61d5fbfe564
--- /dev/null
+++ b/vcl/unx/source/inc/copyflnk_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyflnk_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyflnk_curs_width 32
+#define copyflnk_curs_height 32
+#define copyflnk_curs_x_hot 9
+#define copyflnk_curs_y_hot 9
+static char copyflnk_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
+ 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00,
+ 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00,
+ 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d,
+ 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d,
+ 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/copyflnk_mask.h b/vcl/unx/source/inc/copyflnk_mask.h
new file mode 100644
index 000000000000..110c0cc42991
--- /dev/null
+++ b/vcl/unx/source/inc/copyflnk_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: copyflnk_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define copyflnk_mask_width 32
+#define copyflnk_mask_height 32
+#define copyflnk_mask_x_hot 9
+#define copyflnk_mask_y_hot 9
+static char copyflnk_mask_bits[] = {
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
+ 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00,
+ 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f,
+ 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f,
+ 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f,
+ 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f,
+ 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/crook_curs.h b/vcl/unx/source/inc/crook_curs.h
new file mode 100644
index 000000000000..877730c2c115
--- /dev/null
+++ b/vcl/unx/source/inc/crook_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: crook_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define crook_curs_width 32
+#define crook_curs_height 32
+#define crook_curs_x_hot 15
+#define crook_curs_y_hot 14
+static char crook_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe,
+ 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7,
+ 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed,
+ 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa,
+ 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/crook_mask.h b/vcl/unx/source/inc/crook_mask.h
new file mode 100644
index 000000000000..3e7b2929304f
--- /dev/null
+++ b/vcl/unx/source/inc/crook_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: crook_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define crook_mask_width 32
+#define crook_mask_height 32
+static char crook_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03,
+ 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd,
+ 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f,
+ 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f,
+ 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c,
+ 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/crop_curs.h b/vcl/unx/source/inc/crop_curs.h
new file mode 100644
index 000000000000..a67818a30f7b
--- /dev/null
+++ b/vcl/unx/source/inc/crop_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: crop_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define crop_curs_width 32
+#define crop_curs_height 32
+#define crop_curs_x_hot 9
+#define crop_curs_y_hot 9
+static char crop_curs_bits[] = {
+ 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff,
+ 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff,
+ 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff,
+ 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff,
+ 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff,
+ 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff,
+ 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/crop_mask.h b/vcl/unx/source/inc/crop_mask.h
new file mode 100644
index 000000000000..5731265dee6f
--- /dev/null
+++ b/vcl/unx/source/inc/crop_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: crop_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define crop_mask_width 32
+#define crop_mask_height 32
+static char crop_mask_bits[] = {
+ 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00,
+ 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00,
+ 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00,
+ 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/detective_curs.h b/vcl/unx/source/inc/detective_curs.h
new file mode 100644
index 000000000000..30cf7cb1fc02
--- /dev/null
+++ b/vcl/unx/source/inc/detective_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: detective_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define detective_curs_width 32
+#define detective_curs_height 32
+#define detective_curs_x_hot 12
+#define detective_curs_y_hot 13
+static char detective_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,
+ 0x00,0x00,0x00,0x83,0x01,0x00,0x80,0x00,0x02,0x00,0x80,0x10,0x02,0x00,0x40,
+ 0x38,0x04,0x00,0x40,0x7c,0x04,0x00,0x40,0xfe,0x04,0x00,0x40,0x38,0x04,0x00,
+ 0x40,0x38,0x04,0x00,0x80,0x38,0x02,0x00,0x80,0x00,0x02,0x00,0x00,0x83,0x07,
+ 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38,
+ 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/detective_mask.h b/vcl/unx/source/inc/detective_mask.h
new file mode 100644
index 000000000000..11ad00d35a1e
--- /dev/null
+++ b/vcl/unx/source/inc/detective_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: detective_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define detective_mask_width 32
+#define detective_mask_height 32
+#define detective_mask_x_hot 12
+#define detective_mask_y_hot 13
+static char detective_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,
+ 0x00,0x00,0x00,0xff,0x01,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0xc0,
+ 0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00,
+ 0xc0,0xff,0x07,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0x00,0xff,0x07,
+ 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38,
+ 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/drawarc_curs.h b/vcl/unx/source/inc/drawarc_curs.h
new file mode 100644
index 000000000000..7d7455e5606d
--- /dev/null
+++ b/vcl/unx/source/inc/drawarc_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawarc_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawarc_curs_width 32
+#define drawarc_curs_height 32
+#define drawarc_curs_x_hot 7
+#define drawarc_curs_y_hot 7
+static char drawarc_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawarc_mask.h b/vcl/unx/source/inc/drawarc_mask.h
new file mode 100644
index 000000000000..68a532fef334
--- /dev/null
+++ b/vcl/unx/source/inc/drawarc_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawarc_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawarc_mask_width 32
+#define drawarc_mask_height 32
+static char drawarc_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0x80, 0xe7, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawbezier_curs.h b/vcl/unx/source/inc/drawbezier_curs.h
new file mode 100644
index 000000000000..61099e42a8da
--- /dev/null
+++ b/vcl/unx/source/inc/drawbezier_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawbezier_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawbezier_curs_width 32
+#define drawbezier_curs_height 32
+#define drawbezier_curs_x_hot 7
+#define drawbezier_curs_y_hot 7
+static char drawbezier_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x88, 0x00,
+ 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
+ 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0e, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawbezier_mask.h b/vcl/unx/source/inc/drawbezier_mask.h
new file mode 100644
index 000000000000..77c302f5d216
--- /dev/null
+++ b/vcl/unx/source/inc/drawbezier_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawbezier_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawbezier_mask_width 32
+#define drawbezier_mask_height 32
+static char drawbezier_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x0e, 0x0f, 0x00, 0x00, 0x8e, 0x0f, 0x00, 0x00, 0xdc, 0x0f,
+ 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00,
+ 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x00, 0x1f, 0x07,
+ 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawcaption_curs.h b/vcl/unx/source/inc/drawcaption_curs.h
new file mode 100644
index 000000000000..dd2b97d39747
--- /dev/null
+++ b/vcl/unx/source/inc/drawcaption_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcaption_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcaption_curs_width 32
+#define drawcaption_curs_height 32
+#define drawcaption_curs_x_hot 8
+#define drawcaption_curs_y_hot 8
+static char drawcaption_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff,
+ 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff,
+ 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0x02, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff,
+ 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff,
+ 0xff, 0x7e, 0x1f, 0xe0, 0xff, 0xff, 0xde, 0xef, 0xff, 0xff, 0xc1, 0xef,
+ 0xff, 0xff, 0xdf, 0xef, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/drawcaption_mask.h b/vcl/unx/source/inc/drawcaption_mask.h
new file mode 100644
index 000000000000..53675e4697e5
--- /dev/null
+++ b/vcl/unx/source/inc/drawcaption_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcaption_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcaption_mask_width 32
+#define drawcaption_mask_height 32
+static char drawcaption_mask_bits[] = {
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x43, 0x00, 0x00, 0x80, 0xe3, 0xf0, 0x3f,
+ 0x80, 0xc3, 0xf1, 0x3f, 0x80, 0x83, 0xff, 0x3f, 0x00, 0x00, 0x7f, 0x38,
+ 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf0, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawcirclecut_curs.h b/vcl/unx/source/inc/drawcirclecut_curs.h
new file mode 100644
index 000000000000..2f66f6f8ec25
--- /dev/null
+++ b/vcl/unx/source/inc/drawcirclecut_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcirclecut_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcirclecut_curs_width 32
+#define drawcirclecut_curs_height 32
+#define drawcirclecut_curs_x_hot 7
+#define drawcirclecut_curs_y_hot 7
+static char drawcirclecut_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00,
+ 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawcirclecut_mask.h b/vcl/unx/source/inc/drawcirclecut_mask.h
new file mode 100644
index 000000000000..e4bb3fb22b54
--- /dev/null
+++ b/vcl/unx/source/inc/drawcirclecut_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcirclecut_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcirclecut_mask_width 32
+#define drawcirclecut_mask_height 32
+static char drawcirclecut_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0x00,
+ 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x80, 0xe3, 0x00,
+ 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawconnect_curs.h b/vcl/unx/source/inc/drawconnect_curs.h
new file mode 100644
index 000000000000..9f79bda47d38
--- /dev/null
+++ b/vcl/unx/source/inc/drawconnect_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawconnect_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawconnect_curs_width 32
+#define drawconnect_curs_height 32
+#define drawconnect_curs_x_hot 7
+#define drawconnect_curs_y_hot 7
+static char drawconnect_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x5f, 0x00, 0x00, 0x80, 0x70,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xfd, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawconnect_mask.h b/vcl/unx/source/inc/drawconnect_mask.h
new file mode 100644
index 000000000000..4b833b83f5c7
--- /dev/null
+++ b/vcl/unx/source/inc/drawconnect_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawconnect_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawconnect_mask_width 32
+#define drawconnect_mask_height 32
+static char drawconnect_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
+ 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0xc0, 0xff,
+ 0x00, 0x80, 0xcf, 0xf9, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xfd, 0x01,
+ 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawcrook_curs.h b/vcl/unx/source/inc/drawcrook_curs.h
new file mode 100644
index 000000000000..fd8317b7a88e
--- /dev/null
+++ b/vcl/unx/source/inc/drawcrook_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcrook_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcrook_curs_width 32
+#define drawcrook_curs_height 32
+#define drawcrook_curs_x_hot 15
+#define drawcrook_curs_y_hot 14
+static char drawcrook_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe,
+ 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7,
+ 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed,
+ 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa,
+ 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/drawcrook_mask.h b/vcl/unx/source/inc/drawcrook_mask.h
new file mode 100644
index 000000000000..3d1dce8c7f1e
--- /dev/null
+++ b/vcl/unx/source/inc/drawcrook_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcrook_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcrook_mask_width 32
+#define drawcrook_mask_height 32
+static char drawcrook_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03,
+ 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd,
+ 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f,
+ 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f,
+ 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c,
+ 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawcrop_curs.h b/vcl/unx/source/inc/drawcrop_curs.h
new file mode 100644
index 000000000000..aa287f6e502c
--- /dev/null
+++ b/vcl/unx/source/inc/drawcrop_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcrop_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcrop_curs_width 32
+#define drawcrop_curs_height 32
+#define drawcrop_curs_x_hot 9
+#define drawcrop_curs_y_hot 9
+static char drawcrop_curs_bits[] = {
+ 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff,
+ 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff,
+ 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff,
+ 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff,
+ 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff,
+ 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff,
+ 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/drawcrop_mask.h b/vcl/unx/source/inc/drawcrop_mask.h
new file mode 100644
index 000000000000..c631f8fa4397
--- /dev/null
+++ b/vcl/unx/source/inc/drawcrop_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawcrop_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawcrop_mask_width 32
+#define drawcrop_mask_height 32
+static char drawcrop_mask_bits[] = {
+ 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00,
+ 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00,
+ 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00,
+ 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawellipse_curs.h b/vcl/unx/source/inc/drawellipse_curs.h
new file mode 100644
index 000000000000..f1df489167f0
--- /dev/null
+++ b/vcl/unx/source/inc/drawellipse_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawellipse_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawellipse_curs_width 32
+#define drawellipse_curs_height 32
+#define drawellipse_curs_x_hot 7
+#define drawellipse_curs_y_hot 7
+static char drawellipse_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawellipse_mask.h b/vcl/unx/source/inc/drawellipse_mask.h
new file mode 100644
index 000000000000..4f4c8a00fd2c
--- /dev/null
+++ b/vcl/unx/source/inc/drawellipse_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawellipse_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawellipse_mask_width 32
+#define drawellipse_mask_height 32
+static char drawellipse_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0x80, 0xe7, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01,
+ 0x00, 0x80, 0xe7, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawfreehand_curs.h b/vcl/unx/source/inc/drawfreehand_curs.h
new file mode 100644
index 000000000000..34a54b5124ec
--- /dev/null
+++ b/vcl/unx/source/inc/drawfreehand_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawfreehand_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawfreehand_curs_width 32
+#define drawfreehand_curs_height 32
+#define drawfreehand_curs_x_hot 8
+#define drawfreehand_curs_y_hot 8
+static char drawfreehand_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x70, 0x00, 0x02,
+ 0x00, 0x88, 0x00, 0x02, 0x00, 0x84, 0x00, 0x01, 0x00, 0x84, 0xc0, 0x00,
+ 0x00, 0x04, 0x3f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawfreehand_mask.h b/vcl/unx/source/inc/drawfreehand_mask.h
new file mode 100644
index 000000000000..e56aafe3d56c
--- /dev/null
+++ b/vcl/unx/source/inc/drawfreehand_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawfreehand_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawfreehand_mask_width 32
+#define drawfreehand_mask_height 32
+static char drawfreehand_mask_bits[] = {
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x08,
+ 0x80, 0x03, 0x00, 0x1c, 0x80, 0x73, 0x00, 0x0e, 0x00, 0xf8, 0x00, 0x07,
+ 0x00, 0xfc, 0x01, 0x07, 0x00, 0xce, 0xc1, 0x03, 0x00, 0xce, 0xff, 0x01,
+ 0x00, 0x8e, 0xff, 0x00, 0x00, 0x0e, 0x3f, 0x00, 0x00, 0x0e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawline_curs.h b/vcl/unx/source/inc/drawline_curs.h
new file mode 100644
index 000000000000..830f42966c0b
--- /dev/null
+++ b/vcl/unx/source/inc/drawline_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawline_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawline_curs_width 32
+#define drawline_curs_height 32
+#define drawline_curs_x_hot 7
+#define drawline_curs_y_hot 7
+static char drawline_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawline_mask.h b/vcl/unx/source/inc/drawline_mask.h
new file mode 100644
index 000000000000..58e436fadcc3
--- /dev/null
+++ b/vcl/unx/source/inc/drawline_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawline_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawline_mask_width 32
+#define drawline_mask_height 32
+static char drawline_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0xfe, 0x00, 0x00, 0xbf, 0xfe, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x70,
+ 0xc0, 0x01, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xc0, 0x0f,
+ 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0x00,
+ 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawmirror_curs.h b/vcl/unx/source/inc/drawmirror_curs.h
new file mode 100644
index 000000000000..59b604dcec4b
--- /dev/null
+++ b/vcl/unx/source/inc/drawmirror_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawmirror_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawmirror_curs_width 32
+#define drawmirror_curs_height 32
+#define drawmirror_curs_x_hot 14
+#define drawmirror_curs_y_hot 12
+static char drawmirror_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff,
+ 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff,
+ 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff,
+ 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd,
+ 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb,
+ 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd,
+ 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff,
+ 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff,
+ 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/drawmirror_mask.h b/vcl/unx/source/inc/drawmirror_mask.h
new file mode 100644
index 000000000000..2858036f5139
--- /dev/null
+++ b/vcl/unx/source/inc/drawmirror_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawmirror_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawmirror_mask_width 32
+#define drawmirror_mask_height 32
+static char drawmirror_mask_bits[] = {
+ 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00,
+ 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00,
+ 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00,
+ 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07,
+ 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c,
+ 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07,
+ 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00,
+ 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawpie_curs.h b/vcl/unx/source/inc/drawpie_curs.h
new file mode 100644
index 000000000000..0b289f9dbb2d
--- /dev/null
+++ b/vcl/unx/source/inc/drawpie_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawpie_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawpie_curs_width 32
+#define drawpie_curs_height 32
+#define drawpie_curs_x_hot 7
+#define drawpie_curs_y_hot 7
+static char drawpie_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0a, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf9, 0x00,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawpie_mask.h b/vcl/unx/source/inc/drawpie_mask.h
new file mode 100644
index 000000000000..e0be2e64d35a
--- /dev/null
+++ b/vcl/unx/source/inc/drawpie_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawpie_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawpie_mask_width 32
+#define drawpie_mask_height 32
+static char drawpie_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00,
+ 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01,
+ 0x00, 0x80, 0xfb, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawpolygon_curs.h b/vcl/unx/source/inc/drawpolygon_curs.h
new file mode 100644
index 000000000000..2ac109600373
--- /dev/null
+++ b/vcl/unx/source/inc/drawpolygon_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawpolygon_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawpolygon_curs_width 32
+#define drawpolygon_curs_height 32
+#define drawpolygon_curs_x_hot 7
+#define drawpolygon_curs_y_hot 7
+static char drawpolygon_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x83, 0x00,
+ 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x99, 0x00,
+ 0x00, 0x00, 0x89, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawpolygon_mask.h b/vcl/unx/source/inc/drawpolygon_mask.h
new file mode 100644
index 000000000000..687d8c098798
--- /dev/null
+++ b/vcl/unx/source/inc/drawpolygon_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawpolygon_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawpolygon_mask_width 32
+#define drawpolygon_mask_height 32
+static char drawpolygon_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x06,
+ 0x00, 0x00, 0x1e, 0x07, 0x00, 0x00, 0xbe, 0x07, 0x00, 0x00, 0xfe, 0x07,
+ 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x3e, 0x1f,
+ 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x0e, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawrect_curs.h b/vcl/unx/source/inc/drawrect_curs.h
new file mode 100644
index 000000000000..5734700482b8
--- /dev/null
+++ b/vcl/unx/source/inc/drawrect_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawrect_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawrect_curs_width 32
+#define drawrect_curs_height 32
+#define drawrect_curs_x_hot 7
+#define drawrect_curs_y_hot 7
+static char drawrect_curs_bits[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x81, 0x00,
+ 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawrect_mask.h b/vcl/unx/source/inc/drawrect_mask.h
new file mode 100644
index 000000000000..ce97b52d1ff3
--- /dev/null
+++ b/vcl/unx/source/inc/drawrect_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawrect_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawrect_mask_width 32
+#define drawrect_mask_height 32
+static char drawrect_mask_bits[] = {
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
+ 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01,
+ 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xff, 0x01,
+ 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawtext_curs.h b/vcl/unx/source/inc/drawtext_curs.h
new file mode 100644
index 000000000000..ec2b30198f41
--- /dev/null
+++ b/vcl/unx/source/inc/drawtext_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawtext_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawtext_curs_width 32
+#define drawtext_curs_height 32
+#define drawtext_curs_x_hot 8
+#define drawtext_curs_y_hot 8
+static char drawtext_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x81, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/drawtext_mask.h b/vcl/unx/source/inc/drawtext_mask.h
new file mode 100644
index 000000000000..c045333f0fe4
--- /dev/null
+++ b/vcl/unx/source/inc/drawtext_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawtext_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define drawtext_mask_width 32
+#define drawtext_mask_height 32
+static char drawtext_mask_bits[] = {
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0xc3, 0x1f, 0x00,
+ 0x80, 0xc3, 0x1f, 0x00, 0x80, 0xc3, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xc0, 0x1f, 0x00,
+ 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/fill_curs.h b/vcl/unx/source/inc/fill_curs.h
new file mode 100644
index 000000000000..eab6f5d1f9fc
--- /dev/null
+++ b/vcl/unx/source/inc/fill_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: fill_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define fill_curs_width 32
+#define fill_curs_height 32
+#define fill_curs_x_hot 10
+#define fill_curs_y_hot 22
+static char fill_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x02,0x00,0x00,0x5c,0x0c,0x00,0x00,
+ 0x2e,0x12,0x00,0x00,0x17,0x38,0x00,0x00,0x0b,0x7c,0x00,0x00,0x5b,0xbe,0x00,
+ 0x00,0x27,0x9f,0x00,0x00,0xa7,0x4f,0x00,0x00,0xc7,0x27,0x00,0x00,0x87,0x13,
+ 0x00,0x00,0x06,0x09,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/fill_mask.h b/vcl/unx/source/inc/fill_mask.h
new file mode 100644
index 000000000000..a3d1e935f8a6
--- /dev/null
+++ b/vcl/unx/source/inc/fill_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: fill_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define fill_mask_width 32
+#define fill_mask_height 32
+#define fill_mask_x_hot 10
+#define fill_mask_y_hot 22
+static char fill_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xdc,0x0f,0x00,0x00,
+ 0xfe,0x1f,0x00,0x00,0xff,0x3f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0xff,0x00,
+ 0x00,0xe7,0xff,0x00,0x00,0xe7,0x7f,0x00,0x00,0xc7,0x3f,0x00,0x00,0x87,0x1f,
+ 0x00,0x00,0x06,0x0f,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/hshear_curs.h b/vcl/unx/source/inc/hshear_curs.h
new file mode 100644
index 000000000000..f45a162c866e
--- /dev/null
+++ b/vcl/unx/source/inc/hshear_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: hshear_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define hshear_curs_width 32
+#define hshear_curs_height 32
+#define hshear_curs_x_hot 15
+#define hshear_curs_y_hot 15
+static char hshear_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+ 0x00, 0x3c, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/hshear_mask.h b/vcl/unx/source/inc/hshear_mask.h
new file mode 100644
index 000000000000..d43b505cd6de
--- /dev/null
+++ b/vcl/unx/source/inc/hshear_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: hshear_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define hshear_mask_width 32
+#define hshear_mask_height 32
+static char hshear_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+ 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01,
+ 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x3e, 0x00,
+ 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/invert50.h b/vcl/unx/source/inc/invert50.h
new file mode 100644
index 000000000000..bd9a48e94833
--- /dev/null
+++ b/vcl/unx/source/inc/invert50.h
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * $RCSfile: invert50.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define invert50_width 32
+#define invert50_height 32
+static char invert50_bits[] = {
+#if 1
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+#else
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
+#endif
+};
diff --git a/vcl/unx/source/inc/linkdata_curs.h b/vcl/unx/source/inc/linkdata_curs.h
new file mode 100644
index 000000000000..c6fd5105967c
--- /dev/null
+++ b/vcl/unx/source/inc/linkdata_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkdata_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define linkdata_curs_width 32
+#define linkdata_curs_height 32
+#define linkdata_curs_x_hot 1
+#define linkdata_curs_y_hot 1
+static char linkdata_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00,
+ 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x10, 0xf0, 0x1f, 0x00, 0x08, 0x70, 0x18, 0x00, 0x10, 0xf0, 0x18, 0x00,
+ 0xa8, 0x72, 0x18, 0x00, 0x50, 0x35, 0x1a, 0x00, 0x00, 0x30, 0x1f, 0x00,
+ 0x00, 0xb0, 0x1f, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/linkdata_mask.h b/vcl/unx/source/inc/linkdata_mask.h
new file mode 100644
index 000000000000..93ec3011a8e3
--- /dev/null
+++ b/vcl/unx/source/inc/linkdata_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkdata_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define linkdata_mask_width 32
+#define linkdata_mask_height 32
+#define linkdata_mask_x_hot 1
+#define linkdata_mask_y_hot 1
+static char linkdata_mask_bits[] = {
+ 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00,
+ 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00,
+ 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00,
+ 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/linkfile_curs.h b/vcl/unx/source/inc/linkfile_curs.h
new file mode 100644
index 000000000000..75f391383e49
--- /dev/null
+++ b/vcl/unx/source/inc/linkfile_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkfile_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define linkfile_curs_width 32
+#define linkfile_curs_height 32
+#define linkfile_curs_x_hot 9
+#define linkfile_curs_y_hot 9
+static char linkfile_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00,
+ 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00,
+ 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00,
+ 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x30, 0x00, 0x80, 0xe1, 0x31,
+ 0x00, 0x80, 0xe1, 0x30, 0x00, 0x00, 0x63, 0x34, 0x00, 0x00, 0x63, 0x3e,
+ 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xe0, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/linkfile_mask.h b/vcl/unx/source/inc/linkfile_mask.h
new file mode 100644
index 000000000000..4fb151b8a72f
--- /dev/null
+++ b/vcl/unx/source/inc/linkfile_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkfile_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define linkfile_mask_width 32
+#define linkfile_mask_height 32
+#define linkfile_mask_x_hot 9
+#define linkfile_mask_y_hot 9
+static char linkfile_mask_bits[] = {
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
+ 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00,
+ 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f,
+ 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f,
+ 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f,
+ 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f,
+ 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/magnify_curs.h b/vcl/unx/source/inc/magnify_curs.h
new file mode 100644
index 000000000000..79009a88b1b1
--- /dev/null
+++ b/vcl/unx/source/inc/magnify_curs.h
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: magnify_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define magnify_curs_width 16
+#define magnify_curs_height 16
+#define magnify_curs_x_hot 6
+#define magnify_curs_y_hot 6
+static char magnify_curs_bits[] = {
+ 0x00, 0x00, 0xe0, 0x00, 0x18, 0x03, 0x04, 0x04, 0x14, 0x05, 0x0a, 0x0a,
+ 0x0a, 0x0a, 0x0a, 0x0a, 0x14, 0x05, 0x04, 0x04, 0x18, 0x0f, 0xe0, 0x1c,
+ 0x00, 0x38, 0x00, 0x70, 0x00, 0x60, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/magnify_mask.h b/vcl/unx/source/inc/magnify_mask.h
new file mode 100644
index 000000000000..895582f4cda9
--- /dev/null
+++ b/vcl/unx/source/inc/magnify_mask.h
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * $RCSfile: magnify_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define magnify_mask_width 16
+#define magnify_mask_height 16
+static char magnify_mask_bits[] = {
+ 0xe0, 0x00, 0xf8, 0x03, 0xfc, 0x07, 0xfe, 0x0f, 0xfe, 0x0f, 0xff, 0x1f,
+ 0xff, 0x1f, 0xff, 0x1f, 0xfe, 0x0f, 0xfe, 0x0f, 0xfc, 0x1f, 0xf8, 0x3f,
+ 0xe0, 0x7c, 0x00, 0xf8, 0x00, 0xf0, 0x00, 0xe0};
diff --git a/vcl/unx/source/inc/mirror_curs.h b/vcl/unx/source/inc/mirror_curs.h
new file mode 100644
index 000000000000..931eb7b47762
--- /dev/null
+++ b/vcl/unx/source/inc/mirror_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: mirror_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define mirror_curs_width 32
+#define mirror_curs_height 32
+#define mirror_curs_x_hot 14
+#define mirror_curs_y_hot 12
+static char mirror_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff,
+ 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff,
+ 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff,
+ 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd,
+ 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb,
+ 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd,
+ 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff,
+ 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff,
+ 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/mirror_mask.h b/vcl/unx/source/inc/mirror_mask.h
new file mode 100644
index 000000000000..3337a2226d74
--- /dev/null
+++ b/vcl/unx/source/inc/mirror_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: mirror_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:46 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define mirror_mask_width 32
+#define mirror_mask_height 32
+static char mirror_mask_bits[] = {
+ 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00,
+ 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00,
+ 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00,
+ 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07,
+ 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c,
+ 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07,
+ 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00,
+ 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movebezierweight_curs.h b/vcl/unx/source/inc/movebezierweight_curs.h
new file mode 100644
index 000000000000..ceb4cb7404d1
--- /dev/null
+++ b/vcl/unx/source/inc/movebezierweight_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movebezierweight_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movebezierweight_curs_width 32
+#define movebezierweight_curs_height 32
+#define movebezierweight_curs_x_hot 0
+#define movebezierweight_curs_y_hot 0
+static char movebezierweight_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff,
+ 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,
+ 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff,
+ 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff,
+ 0x99, 0xff, 0xff, 0xef, 0x3d, 0xff, 0xff, 0xef, 0x3f, 0xff, 0xff, 0xef,
+ 0x7f, 0xfe, 0xff, 0xf7, 0x7f, 0xfe, 0xff, 0xf7, 0xff, 0xfc, 0xff, 0xfb,
+ 0xff, 0x7c, 0xff, 0xec, 0xff, 0xbf, 0x0e, 0xd7, 0xff, 0x7f, 0xf3, 0xef,
+ 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff,
+ 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/movebezierweight_mask.h b/vcl/unx/source/inc/movebezierweight_mask.h
new file mode 100644
index 000000000000..ed5235fcdd3b
--- /dev/null
+++ b/vcl/unx/source/inc/movebezierweight_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: movebezierweight_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movebezierweight_mask_width 32
+#define movebezierweight_mask_height 32
+static char movebezierweight_mask_bits[] = {
+ 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x10,
+ 0xff, 0x00, 0x00, 0x38, 0xe7, 0x01, 0x00, 0x38, 0xe3, 0x01, 0x00, 0x38,
+ 0xc0, 0x03, 0x00, 0x1c, 0xc0, 0x03, 0x00, 0x1c, 0x80, 0x87, 0x00, 0x1f,
+ 0x80, 0xc7, 0xf1, 0x3f, 0x80, 0xe7, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0x38,
+ 0x00, 0x80, 0x0f, 0x10, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movedata_curs.h b/vcl/unx/source/inc/movedata_curs.h
new file mode 100644
index 000000000000..7a59a9a4ec90
--- /dev/null
+++ b/vcl/unx/source/inc/movedata_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movedata_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movedata_curs_width 32
+#define movedata_curs_height 32
+#define movedata_curs_x_hot 1
+#define movedata_curs_y_hot 1
+static char movedata_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00,
+ 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00,
+ 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00,
+ 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movedata_mask.h b/vcl/unx/source/inc/movedata_mask.h
new file mode 100644
index 000000000000..9b3af4d24282
--- /dev/null
+++ b/vcl/unx/source/inc/movedata_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movedata_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movedata_mask_width 32
+#define movedata_mask_height 32
+#define movedata_mask_x_hot 1
+#define movedata_mask_y_hot 1
+static char movedata_mask_bits[] = {
+ 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00,
+ 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00,
+ 0x3c, 0xe0, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movedlnk_curs.h b/vcl/unx/source/inc/movedlnk_curs.h
new file mode 100644
index 000000000000..1bfd85decca1
--- /dev/null
+++ b/vcl/unx/source/inc/movedlnk_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movedlnk_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movedlnk_curs_width 32
+#define movedlnk_curs_height 32
+#define movedlnk_curs_x_hot 1
+#define movedlnk_curs_y_hot 1
+static char movedlnk_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00,
+ 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x81, 0x00, 0x00,
+ 0x30, 0x41, 0x00, 0x00, 0x10, 0x81, 0x00, 0x00, 0xd0, 0x41, 0x00, 0x00,
+ 0xf0, 0xa9, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movedlnk_mask.h b/vcl/unx/source/inc/movedlnk_mask.h
new file mode 100644
index 000000000000..9fccbb7b72ff
--- /dev/null
+++ b/vcl/unx/source/inc/movedlnk_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movedlnk_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movedlnk_mask_width 32
+#define movedlnk_mask_height 32
+#define movedlnk_mask_x_hot 1
+#define movedlnk_mask_y_hot 1
+static char movedlnk_mask_bits[] = {
+ 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00,
+ 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00,
+ 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00,
+ 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00,
+ 0xf8, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movefile_curs.h b/vcl/unx/source/inc/movefile_curs.h
new file mode 100644
index 000000000000..99d565ac292f
--- /dev/null
+++ b/vcl/unx/source/inc/movefile_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movefile_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movefile_curs_width 32
+#define movefile_curs_height 32
+#define movefile_curs_x_hot 9
+#define movefile_curs_y_hot 9
+static char movefile_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00,
+ 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00,
+ 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00,
+ 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movefile_mask.h b/vcl/unx/source/inc/movefile_mask.h
new file mode 100644
index 000000000000..60c4291ce38a
--- /dev/null
+++ b/vcl/unx/source/inc/movefile_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movefile_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movefile_mask_width 32
+#define movefile_mask_height 32
+#define movefile_mask_x_hot 9
+#define movefile_mask_y_hot 9
+static char movefile_mask_bits[] = {
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
+ 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00,
+ 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movefiles_curs.h b/vcl/unx/source/inc/movefiles_curs.h
new file mode 100644
index 000000000000..4a68f87e1881
--- /dev/null
+++ b/vcl/unx/source/inc/movefiles_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movefiles_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movefiles_curs_width 32
+#define movefiles_curs_height 32
+#define movefiles_curs_x_hot 8
+#define movefiles_curs_y_hot 9
+static char movefiles_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00,
+ 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00,
+ 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00,
+ 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00,
+ 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00,
+ 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00,
+ 0x00, 0x61, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+ 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movefiles_mask.h b/vcl/unx/source/inc/movefiles_mask.h
new file mode 100644
index 000000000000..2d7376344a81
--- /dev/null
+++ b/vcl/unx/source/inc/movefiles_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movefiles_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movefiles_mask_width 32
+#define movefiles_mask_height 32
+#define movefiles_mask_x_hot 8
+#define movefiles_mask_y_hot 9
+static char movefiles_mask_bits[] = {
+ 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00,
+ 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00,
+ 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00,
+ 0x80, 0xff, 0x00, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00,
+ 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/moveflnk_curs.h b/vcl/unx/source/inc/moveflnk_curs.h
new file mode 100644
index 000000000000..6f3c7374a700
--- /dev/null
+++ b/vcl/unx/source/inc/moveflnk_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: moveflnk_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define moveflnk_curs_width 32
+#define moveflnk_curs_height 32
+#define moveflnk_curs_x_hot 9
+#define moveflnk_curs_y_hot 9
+static char moveflnk_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
+ 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00,
+ 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00,
+ 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/moveflnk_mask.h b/vcl/unx/source/inc/moveflnk_mask.h
new file mode 100644
index 000000000000..fc6e5ac17b4f
--- /dev/null
+++ b/vcl/unx/source/inc/moveflnk_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: moveflnk_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define moveflnk_mask_width 32
+#define moveflnk_mask_height 32
+#define moveflnk_mask_x_hot 9
+#define moveflnk_mask_y_hot 9
+static char moveflnk_mask_bits[] = {
+ 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
+ 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00,
+ 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
+ 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/movepoint_curs.h b/vcl/unx/source/inc/movepoint_curs.h
new file mode 100644
index 000000000000..17ff925c2dab
--- /dev/null
+++ b/vcl/unx/source/inc/movepoint_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: movepoint_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movepoint_curs_width 32
+#define movepoint_curs_height 32
+#define movepoint_curs_x_hot 0
+#define movepoint_curs_y_hot 0
+static char movepoint_curs_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff,
+ 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,
+ 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff,
+ 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff,
+ 0x39, 0xff, 0xff, 0xff, 0x3d, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+ 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0x83, 0xff, 0xff, 0xfc, 0x83, 0xff,
+ 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/vcl/unx/source/inc/movepoint_mask.h b/vcl/unx/source/inc/movepoint_mask.h
new file mode 100644
index 000000000000..d7fa0c7d6bd1
--- /dev/null
+++ b/vcl/unx/source/inc/movepoint_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: movepoint_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define movepoint_mask_width 32
+#define movepoint_mask_height 32
+static char movepoint_mask_bits[] = {
+ 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
+ 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0xef, 0x01, 0x00, 0x00, 0xe7, 0x01, 0x00, 0x00, 0xc3, 0x03, 0x00, 0x00,
+ 0xc0, 0x03, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00,
+ 0x80, 0x07, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00,
+ 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/nodrop_curs.h b/vcl/unx/source/inc/nodrop_curs.h
new file mode 100644
index 000000000000..739b69fed185
--- /dev/null
+++ b/vcl/unx/source/inc/nodrop_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: nodrop_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define nodrop_curs_width 32
+#define nodrop_curs_height 32
+#define nodrop_curs_x_hot 9
+#define nodrop_curs_y_hot 9
+static char nodrop_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00,
+ 0xf8, 0x7f, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0x1c, 0xfc, 0x00, 0x00,
+ 0x1e, 0xfe, 0x01, 0x00, 0x0e, 0xdf, 0x01, 0x00, 0x8e, 0xcf, 0x01, 0x00,
+ 0xce, 0xc7, 0x01, 0x00, 0xee, 0xc3, 0x01, 0x00, 0xfe, 0xe1, 0x01, 0x00,
+ 0xfc, 0xe0, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00,
+ 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/nodrop_mask.h b/vcl/unx/source/inc/nodrop_mask.h
new file mode 100644
index 000000000000..81ae6be5d3f0
--- /dev/null
+++ b/vcl/unx/source/inc/nodrop_mask.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: nodrop_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define nodrop_mask_width 32
+#define nodrop_mask_height 32
+#define nodrop_mask_x_hot 9
+#define nodrop_mask_y_hot 9
+static char nodrop_mask_bits[] = {
+ 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00,
+ 0xfc, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x7e, 0xfe, 0x01, 0x00,
+ 0x3f, 0xff, 0x03, 0x00, 0x9f, 0xff, 0x03, 0x00, 0xdf, 0xff, 0x03, 0x00,
+ 0xff, 0xef, 0x03, 0x00, 0xff, 0xe7, 0x03, 0x00, 0xff, 0xf3, 0x03, 0x00,
+ 0xfe, 0xf9, 0x01, 0x00, 0xfe, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00,
+ 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/null_curs.h b/vcl/unx/source/inc/null_curs.h
new file mode 100644
index 000000000000..884c4dd480f3
--- /dev/null
+++ b/vcl/unx/source/inc/null_curs.h
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * $RCSfile: null_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define nullcurs_width 4
+#define nullcurs_height 4
+#define nullcurs_x_hot 2
+#define nullcurs_y_hot 2
+static char nullcurs_bits[] = { 0x00, 0x00 };
diff --git a/vcl/unx/source/inc/null_mask.h b/vcl/unx/source/inc/null_mask.h
new file mode 100644
index 000000000000..f1f8c1c7c5aa
--- /dev/null
+++ b/vcl/unx/source/inc/null_mask.h
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * $RCSfile: null_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define nullmask_width 4
+#define nullmask_height 4
+static char nullmask_bits[] = { 0x00, 0x00 };
diff --git a/vcl/unx/source/inc/pivotcol_curs.h b/vcl/unx/source/inc/pivotcol_curs.h
new file mode 100644
index 000000000000..7dc40c274e69
--- /dev/null
+++ b/vcl/unx/source/inc/pivotcol_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotcol_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotcol_curs_width 32
+#define pivotcol_curs_height 32
+#define pivotcol_curs_x_hot 10
+#define pivotcol_curs_y_hot 13
+static char pivotcol_curs_bits[] = {
+ 0xff,0xff,0xff,0xff,0x01,0x80,0x00,0x80,0x55,0x95,0x54,0x95,0xa9,0xaa,0xaa,
+ 0xaa,0x01,0x80,0x00,0x80,0xff,0xff,0xff,0xff,0x81,0x80,0x80,0x80,0x95,0xaa,
+ 0xaa,0xaa,0xa9,0x94,0x94,0x94,0x95,0xaa,0xaa,0xaa,0xa9,0x94,0x94,0x94,0x81,
+ 0x80,0x80,0x80,0xff,0xff,0xff,0xff,0x00,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,
+ 0x00,0x14,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x84,0x00,
+ 0x00,0x00,0x04,0x01,0x00,0x00,0x04,0x02,0x00,0x00,0x04,0x04,0x00,0x00,0x04,
+ 0x08,0x00,0x00,0x04,0x1f,0x00,0x00,0x64,0x01,0x00,0x00,0x54,0x02,0x00,0x00,
+ 0x8c,0x02,0x00,0x00,0x84,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x09,0x00,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x06,0x00};
diff --git a/vcl/unx/source/inc/pivotcol_mask.h b/vcl/unx/source/inc/pivotcol_mask.h
new file mode 100644
index 000000000000..75bba6d6dfc4
--- /dev/null
+++ b/vcl/unx/source/inc/pivotcol_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotcol_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotcol_mask_width 32
+#define pivotcol_mask_height 32
+#define pivotcol_mask_x_hot 10
+#define pivotcol_mask_y_hot 13
+static char pivotcol_mask_bits[] = {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,
+ 0x00,0x1c,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0xfc,0x00,
+ 0x00,0x00,0xfc,0x01,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x07,0x00,0x00,0xfc,
+ 0x0f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc,0x01,0x00,0x00,0xdc,0x03,0x00,0x00,
+ 0x8c,0x03,0x00,0x00,0x84,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x0f,0x00,
+ 0x00,0x00,0x0e,0x00,0x00,0x00,0x06,0x00};
diff --git a/vcl/unx/source/inc/pivotfld_curs.h b/vcl/unx/source/inc/pivotfld_curs.h
new file mode 100644
index 000000000000..a3ed760985f2
--- /dev/null
+++ b/vcl/unx/source/inc/pivotfld_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotfld_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotfld_curs_width 32
+#define pivotfld_curs_height 32
+#define pivotfld_curs_x_hot 10
+#define pivotfld_curs_y_hot 13
+static char pivotfld_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x3f,0x04,0x00,0x00,
+ 0x30,0xa4,0xaa,0xaa,0x3a,0x54,0x55,0x55,0x35,0xa4,0xaa,0xaa,0x3a,0x54,0x55,
+ 0x55,0x35,0xa4,0xaa,0xaa,0x3a,0x54,0x55,0x55,0x35,0xa4,0xaa,0xaa,0x3a,0xf4,
+ 0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0x00,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,
+ 0x00,0x14,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x84,0x00,
+ 0x00,0x00,0x04,0x01,0x00,0x00,0x04,0x02,0x00,0x00,0x04,0x04,0x00,0x00,0x04,
+ 0x08,0x00,0x00,0x04,0x1f,0x00,0x00,0x64,0x01,0x00,0x00,0x54,0x02,0x00,0x00,
+ 0x8c,0x02,0x00,0x00,0x84,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x09,0x00,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x06,0x00};
diff --git a/vcl/unx/source/inc/pivotfld_mask.h b/vcl/unx/source/inc/pivotfld_mask.h
new file mode 100644
index 000000000000..2371fad5eea2
--- /dev/null
+++ b/vcl/unx/source/inc/pivotfld_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotfld_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotfld_mask_width 32
+#define pivotfld_mask_height 32
+#define pivotfld_mask_x_hot 10
+#define pivotfld_mask_y_hot 13
+static char pivotfld_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x3f,0xfc,0xff,0xff,
+ 0x3f,0xfc,0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0xfc,0xff,
+ 0xff,0x3f,0xfc,0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0xfc,
+ 0xff,0xff,0x3f,0xfc,0xff,0xff,0x3f,0x00,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,
+ 0x00,0x1c,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0xfc,0x00,
+ 0x00,0x00,0xfc,0x01,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x07,0x00,0x00,0xfc,
+ 0x0f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc,0x01,0x00,0x00,0xdc,0x03,0x00,0x00,
+ 0x8c,0x03,0x00,0x00,0x84,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x0f,0x00,
+ 0x00,0x00,0x0e,0x00,0x00,0x00,0x06,0x00};
diff --git a/vcl/unx/source/inc/pivotrow_curs.h b/vcl/unx/source/inc/pivotrow_curs.h
new file mode 100644
index 000000000000..19e230131d88
--- /dev/null
+++ b/vcl/unx/source/inc/pivotrow_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotrow_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotrow_curs_width 32
+#define pivotrow_curs_height 32
+#define pivotrow_curs_x_hot 22
+#define pivotrow_curs_y_hot 13
+static char pivotrow_curs_bits[] = {
+ 0xff,0xff,0x3f,0x00,0x01,0x04,0x20,0x00,0xa9,0xa4,0x2a,0x00,0x55,0x55,0x25,
+ 0x00,0xa9,0xa4,0x2a,0x00,0x55,0x55,0x25,0x00,0xa9,0x04,0x20,0x00,0x55,0xfd,
+ 0x3f,0x00,0xa9,0x04,0x20,0x00,0x55,0x55,0x25,0x00,0xa9,0xa4,0x2a,0x00,0x55,
+ 0x55,0x25,0x00,0xa9,0xa4,0x2a,0x00,0x55,0x55,0x65,0x00,0x01,0x04,0xe0,0x00,
+ 0xff,0xff,0x7f,0x01,0x01,0x04,0x60,0x02,0x55,0x55,0x65,0x04,0xa9,0xa4,0x6a,
+ 0x08,0x55,0x55,0x65,0x10,0xa9,0xa4,0x6a,0x20,0x55,0x55,0x65,0x40,0xa9,0x04,
+ 0x60,0x80,0x55,0xfd,0x7f,0xf0,0xa9,0x04,0x60,0x16,0x55,0x55,0x65,0x25,0xa9,
+ 0xa4,0xea,0x28,0x55,0x55,0x65,0x48,0xa9,0xa4,0x2a,0x50,0x55,0x55,0x25,0x90,
+ 0x01,0x04,0x20,0xa0,0xff,0xff,0x3f,0x60};
diff --git a/vcl/unx/source/inc/pivotrow_mask.h b/vcl/unx/source/inc/pivotrow_mask.h
new file mode 100644
index 000000000000..52419ae19532
--- /dev/null
+++ b/vcl/unx/source/inc/pivotrow_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: pivotrow_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define pivotrow_mask_width 32
+#define pivotrow_mask_height 32
+#define pivotrow_curs_x_hot 22
+#define pivotrow_curs_y_hot 13
+static char pivotrow_mask_bits[] = {
+ 0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,
+ 0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,
+ 0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,
+ 0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x7f,0x00,0xff,0xff,0xff,0x00,
+ 0xff,0xff,0xff,0x01,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0x07,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0x7f,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0x3d,0xff,
+ 0xff,0xff,0x38,0xff,0xff,0x7f,0x78,0xff,0xff,0x3f,0x70,0xff,0xff,0x3f,0xf0,
+ 0xff,0xff,0x3f,0xe0,0xff,0xff,0x3f,0x60};
diff --git a/vcl/unx/source/inc/rotate_curs.h b/vcl/unx/source/inc/rotate_curs.h
new file mode 100644
index 000000000000..1a9d1628e728
--- /dev/null
+++ b/vcl/unx/source/inc/rotate_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: rotate_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define rotate_curs_width 32
+#define rotate_curs_height 32
+#define rotate_curs_x_hot 15
+#define rotate_curs_y_hot 15
+static char rotate_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xd8, 0x00, 0x00,
+ 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00,
+ 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xe0, 0x03, 0x80, 0x00, 0x80, 0x00,
+ 0x00, 0x01, 0x40, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00,
+ 0x00, 0x04, 0x10, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/rotate_mask.h b/vcl/unx/source/inc/rotate_mask.h
new file mode 100644
index 000000000000..2ff24422007a
--- /dev/null
+++ b/vcl/unx/source/inc/rotate_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: rotate_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define rotate_mask_width 32
+#define rotate_mask_height 32
+static char rotate_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xfc, 0x01, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+ 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xe0, 0x03, 0xc0, 0x01, 0xf0, 0x07, 0xc0, 0x01, 0xf0, 0x07,
+ 0x80, 0x03, 0xe0, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x1e, 0x3c, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/timemove_curs.h b/vcl/unx/source/inc/timemove_curs.h
new file mode 100644
index 000000000000..2f1a34027850
--- /dev/null
+++ b/vcl/unx/source/inc/timemove_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: timemove_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define timemove_curs_width 32
+#define timemove_curs_height 32
+#define timemove_curs_x_hot 16
+#define timemove_curs_y_hot 16
+static char timemove_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xff,0xff,0x01,
+ 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff,
+ 0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,
+ 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/timemove_mask.h b/vcl/unx/source/inc/timemove_mask.h
new file mode 100644
index 000000000000..b2715335a988
--- /dev/null
+++ b/vcl/unx/source/inc/timemove_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: timemove_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define timemove_mask_width 32
+#define timemove_mask_height 32
+#define timemove_mask_x_hot 16
+#define timemove_mask_y_hot 16
+static char timemove_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,
+ 0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,
+ 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,
+ 0x03,0x80,0xff,0xff,0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,
+ 0x0f,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/timesize_curs.h b/vcl/unx/source/inc/timesize_curs.h
new file mode 100644
index 000000000000..7cc0d99926ae
--- /dev/null
+++ b/vcl/unx/source/inc/timesize_curs.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: timesize_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define timesize_curs_width 32
+#define timesize_curs_height 32
+#define timesize_curs_x_hot 16
+#define timesize_curs_y_hot 16
+static char timesize_curs_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x01,0x01,0x00,0x81,0x03,0x01,0x00,0xc1,0x07,0x01,0x00,0x01,0x01,0x01,
+ 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff,0x01,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,
+ 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/timesize_mask.h b/vcl/unx/source/inc/timesize_mask.h
new file mode 100644
index 000000000000..036428e98202
--- /dev/null
+++ b/vcl/unx/source/inc/timesize_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: timesize_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define timesize_mask_width 32
+#define timesize_mask_height 32
+#define timesize_mask_x_hot 16
+#define timesize_mask_y_hot 16
+static char timesize_mask_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
+ 0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,
+ 0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,
+ 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,
+ 0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0,
+ 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/vcl/unx/source/inc/vshear_curs.h b/vcl/unx/source/inc/vshear_curs.h
new file mode 100644
index 000000000000..d5a2bc019770
--- /dev/null
+++ b/vcl/unx/source/inc/vshear_curs.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: vshear_curs.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define vshear_curs_width 32
+#define vshear_curs_height 32
+#define vshear_curs_x_hot 15
+#define vshear_curs_y_hot 15
+static char vshear_curs_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00,
+ 0x00, 0x20, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00,
+ 0x00, 0x38, 0x04, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00,
+ 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00,
+ 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x0c, 0x00,
+ 0x00, 0x20, 0x0c, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/inc/vshear_mask.h b/vcl/unx/source/inc/vshear_mask.h
new file mode 100644
index 000000000000..9006fbb3f17f
--- /dev/null
+++ b/vcl/unx/source/inc/vshear_mask.h
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: vshear_mask.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define vshear_mask_width 32
+#define vshear_mask_height 32
+static char vshear_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00,
+ 0x00, 0x70, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00,
+ 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00,
+ 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x3e, 0x00,
+ 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x1e, 0x00,
+ 0x00, 0x70, 0x1e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00,
+ 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/vcl/unx/source/window/FWS.cxx b/vcl/unx/source/window/FWS.cxx
new file mode 100644
index 000000000000..3e340b104145
--- /dev/null
+++ b/vcl/unx/source/window/FWS.cxx
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * $RCSfile: FWS.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+
+#ifndef _FOREIGN_WINDOW_SYSTEM_HXX
+#include "FWS.hxx"
+#endif
+
+static Atom fwsIconAtom;
+
+static Atom FWS_CLIENT;
+static Atom FWS_COMM_WINDOW;
+static Atom FWS_PROTOCOLS;
+static Atom FWS_STACK_UNDER;
+static Atom FWS_PARK_ICONS;
+static Atom FWS_PASS_ALL_INPUT;
+static Atom FWS_PASSES_INPUT;
+static Atom FWS_HANDLES_FOCUS;
+
+static Atom FWS_REGISTER_WINDOW;
+static Atom FWS_STATE_CHANGE;
+static Atom FWS_UNSEEN_STATE;
+static Atom FWS_NORMAL_STATE;
+static Atom WM_PROTOCOLS;
+static Atom WM_CHANGE_STATE;
+
+static Bool fwsStackUnder;
+static Bool fwsParkIcons;
+static Bool fwsPassesInput;
+static Bool fwsHandlesFocus;
+
+static Window fwsCommWindow;
+
+/*************************************<->***********************************
+ *
+ * WMSupportsFWS() -
+ *
+ * Initialize our atoms and determine if the current window manager is
+ * providing FWS extension support.
+ *
+ *************************************<->***********************************/
+
+Bool
+WMSupportsFWS (Display *display, int screen)
+{
+ int i;
+ Atom protocol;
+ Atom propType;
+ int propFormat;
+ unsigned long propItems;
+ unsigned long propBytesAfter;
+ unsigned char *propData;
+ char propName[30];
+
+ FWS_CLIENT = XInternAtom(display, "_SUN_FWS_CLIENT", False);
+ FWS_COMM_WINDOW = XInternAtom(display, "_SUN_FWS_COMM_WINDOW", False);
+ FWS_PROTOCOLS = XInternAtom(display, "_SUN_FWS_PROTOCOLS", False);
+ FWS_STACK_UNDER = XInternAtom(display, "_SUN_FWS_STACK_UNDER", False);
+ FWS_PARK_ICONS = XInternAtom(display, "_SUN_FWS_PARK_ICONS", False);
+ FWS_PASS_ALL_INPUT = XInternAtom(display, "_SUN_FWS_PASS_ALL_INPUT", False);
+ FWS_PASSES_INPUT = XInternAtom(display, "_SUN_FWS_PASSES_INPUT", False);
+ FWS_HANDLES_FOCUS = XInternAtom(display, "_SUN_FWS_HANDLES_FOCUS", False);
+ FWS_REGISTER_WINDOW= XInternAtom(display, "_SUN_FWS_REGISTER_WINDOW",False);
+ FWS_STATE_CHANGE = XInternAtom(display, "_SUN_FWS_STATE_CHANGE", False);
+ FWS_UNSEEN_STATE = XInternAtom(display, "_SUN_FWS_UNSEEN_STATE", False);
+ FWS_NORMAL_STATE = XInternAtom(display, "_SUN_FWS_NORMAL_STATE", False);
+ WM_PROTOCOLS = XInternAtom(display, "WM_PROTOCOLS", False);
+ WM_CHANGE_STATE = XInternAtom(display, "WM_CHANGE_STATE", False);
+
+ sprintf (propName, "_SUN_FWS_NEXT_ICON_%d", screen);
+ fwsIconAtom = XInternAtom(display, propName, False);
+
+ if (XGetWindowProperty (display, DefaultRootWindow (display),
+ FWS_COMM_WINDOW, 0, 1,
+ False, AnyPropertyType, &propType,
+ &propFormat, &propItems,
+ &propBytesAfter, &propData) != Success)
+ return False;
+
+ if (propFormat != 32 ||
+ propItems != 1 ||
+ propBytesAfter != 0)
+ {
+ #ifdef DEBUG
+ fprintf (stderr, "Bad FWS_COMM_WINDOW property on root window.\n");
+ #endif
+ XFree (propData);
+ return False;
+ }
+
+ fwsCommWindow = *(Window *) propData;
+ #ifdef DEBUG
+ fprintf (stderr, "Using fwsCommWindow = 0x%lx.\n", fwsCommWindow);
+ #endif
+ XFree (propData);
+
+
+ if (XGetWindowProperty (display, DefaultRootWindow (display),
+ FWS_PROTOCOLS, 0, 10,
+ False, AnyPropertyType, &propType,
+ &propFormat, &propItems,
+ &propBytesAfter, &propData) != Success)
+ {
+ return False;
+ }
+
+ if (propFormat != 32 ||
+ propBytesAfter != 0)
+ {
+ #ifdef DEBUG
+ fprintf (stderr, "Bad FWS_PROTOCOLS property on root window.\n");
+ #endif
+ XFree (propData);
+ return False;
+ }
+
+ for (i = 0; i < propItems; ++i)
+ {
+ protocol = ((Atom *) propData)[i];
+ if (protocol == FWS_STACK_UNDER)
+ {
+ fwsStackUnder = True;
+ #ifdef DEBUG
+ fprintf (stderr, "Using fwsStackUnder.\n");
+ #endif
+ }
+ else
+ if (protocol == FWS_PARK_ICONS)
+ {
+ fwsParkIcons = True;
+ #ifdef DEBUG
+ fprintf (stderr, "Using fwsParkIcons.\n");
+ #endif
+ }
+ else
+ if (protocol == FWS_PASSES_INPUT)
+ {
+ fwsPassesInput = True;
+ #ifdef DEBUG
+ fprintf (stderr, "Using fwsPassesInput.\n");
+ #endif
+ }
+ else
+ if (protocol == FWS_HANDLES_FOCUS)
+ {
+ fwsHandlesFocus = True;
+ #ifdef DEBUG
+ fprintf (stderr, "Using fwsHandlesFocus.\n");
+ #endif
+ }
+ }
+
+ XFree (propData);
+ return True;
+}
+
+/*************************************<->***********************************
+ *
+ * newHandler() -
+ *
+ * Handle X errors (temporarily) to record the occurance of BadWindow
+ * errors without crashing. Used to detect the FWS_COMM_WINDOW root window
+ * property containing an old or obsolete window id.
+ *
+ *************************************<->***********************************/
+
+extern "C" {
+
+static Bool badWindowFound;
+static int (* oldHandler) (Display *, XErrorEvent *);
+
+static int
+newHandler (Display *display, XErrorEvent *xerror)
+{
+ if (xerror->error_code != BadWindow)
+ (*oldHandler)(display, xerror);
+ else
+ badWindowFound = True;
+
+ return 0;
+}
+
+}
+
+/*************************************<->***********************************
+ *
+ * RegisterFwsWindow() -
+ *
+ * Send a client message to the FWS_COMM_WINDOW indicating the existance
+ * of a new FWS client window. Be careful to avoid BadWindow errors on
+ * the XSendEvent in case the FWS_COMM_WINDOW root window property had
+ * old/obsolete junk in it.
+ *
+ *************************************<->***********************************/
+
+Bool
+RegisterFwsWindow (Display *display, Window window)
+{
+ XClientMessageEvent msg;
+
+ msg.type = ClientMessage;
+ msg.window = fwsCommWindow;
+ msg.message_type = FWS_REGISTER_WINDOW;
+ msg.format = 32;
+ msg.data.l[0] = window;
+
+ XSync (display, False);
+ badWindowFound = False;
+ oldHandler = XSetErrorHandler (newHandler);
+
+ XSendEvent (display, fwsCommWindow, False, NoEventMask,
+ (XEvent *) &msg);
+ XSync (display, False);
+
+ XSetErrorHandler (oldHandler);
+ #ifdef DEBUG
+ if (badWindowFound)
+ fprintf (stderr, "No FWS client window to register with.\n");
+ #endif
+
+ return !badWindowFound;
+}
+
+/*************************************<->***********************************
+ *
+ * AddFwsProtocols -
+ *
+ * Add the FWS protocol atoms to the WMProtocols property for the window.
+ *
+ *************************************<->***********************************/
+
+void
+AddFwsProtocols (Display *display, Window window)
+{
+ #define MAX_FWS_PROTOS 10
+
+ Atom fwsProtocols[ MAX_FWS_PROTOS ];
+ int nProtos = 0;
+
+ fwsProtocols[ nProtos++ ] = FWS_CLIENT;
+ fwsProtocols[ nProtos++ ] = FWS_STACK_UNDER;
+ fwsProtocols[ nProtos++ ] = FWS_STATE_CHANGE;
+ fwsProtocols[ nProtos++ ] = FWS_PASS_ALL_INPUT;
+ XChangeProperty (display, window, WM_PROTOCOLS,
+ XA_ATOM, 32, PropModeAppend,
+ (unsigned char *) fwsProtocols, nProtos);
+}
+
diff --git a/vcl/unx/source/window/FWS.hxx b/vcl/unx/source/window/FWS.hxx
new file mode 100644
index 000000000000..b70997ff7c96
--- /dev/null
+++ b/vcl/unx/source/window/FWS.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * $RCSfile: FWS.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _FOREIGN_WINDOW_SYSTEM_HXX
+#define _FOREIGN_WINDOW_SYSTEM_HXX
+
+#include <X11/Xlib.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* Initialize our atoms and determine if the current window manager is
+ * providing FWS extension support.
+ */
+
+Bool
+WMSupportsFWS (Display *display, int screen);
+
+/* Send a client message to the FWS_COMM_WINDOW indicating the existance
+ * of a new FWS client window. Be careful to avoid BadWindow errors on
+ * the XSendEvent in case the FWS_COMM_WINDOW root window property had
+ * old/obsolete junk in it.
+ */
+
+Bool
+RegisterFwsWindow (Display *display, Window window);
+
+/* Add the FWS protocol atoms to the WMProtocols property for the window.
+ */
+
+void
+AddFwsProtocols (Display *display, Window window);
+
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif
+
+#endif _FOREIGN_WINDOW_SYSTEM_HXX
+
diff --git a/vcl/unx/source/window/makefile.mk b/vcl/unx/source/window/makefile.mk
new file mode 100644
index 000000000000..69d4cf6196dd
--- /dev/null
+++ b/vcl/unx/source/window/makefile.mk
@@ -0,0 +1,97 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=vcl
+TARGET=salwin
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(OS)"=="MACOSX"
+
+dummy:
+ @echo "Nothing to build for Mac OS X"
+
+.ELSE # "$(OS)"=="MACOSX"
+
+.IF "$(remote)"
+SLOFILES= \
+ $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj
+.ENDIF
+
+.ENDIF # "$(OS)"=="MACOSX"
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
new file mode 100644
index 000000000000..bde3233e1699
--- /dev/null
+++ b/vcl/unx/source/window/salframe.cxx
@@ -0,0 +1,2614 @@
+/*************************************************************************
+ *
+ * $RCSfile: salframe.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALFRAME_CXX
+
+// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <alloca.h>
+
+#include <prex.h>
+#include <X11/Xatom.h>
+#include <X11/keysym.h>
+
+#ifndef _FOREIGN_WINDOW_SYSTEM_HXX
+#include "FWS.hxx"
+#endif
+
+#include <postx.h>
+
+#include <salunx.h>
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALGDI_HXX
+#include <salgdi.hxx>
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _SV_KEYCOES_HXX
+#include <keycodes.hxx>
+#endif
+#ifndef _SV_SOICON_HXX
+#include <soicon.hxx>
+#endif
+#ifndef _SV_SYSDATA_HXX
+#include <sysdata.hxx>
+#endif
+#ifndef _SV_DTINT_HXX
+#include <dtint.hxx>
+#endif
+#ifndef _VCL_SM_HXX
+#include <sm.hxx>
+#endif
+#ifndef _SV_SETTINGS_HXX
+#include <settings.hxx>
+#endif
+
+#include <svapp.hxx>
+
+#ifndef _SAL_I18N_INPUTCONTEXT_HXX
+#include "i18n_ic.hxx"
+#endif
+
+// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#define SHOWSTATE_UNKNOWN -1
+#define SHOWSTATE_MINIMIZED 0
+#define SHOWSTATE_NORMAL 1
+
+// | KeymapStateMask
+#define CLIENT_EVENTS StructureNotifyMask \
+ | SubstructureNotifyMask \
+ | KeyPressMask \
+ | KeyReleaseMask \
+ | ButtonPressMask \
+ | ButtonReleaseMask \
+ | PointerMotionMask \
+ | EnterWindowMask \
+ | LeaveWindowMask \
+ | FocusChangeMask \
+ | ExposureMask \
+ | VisibilityChangeMask \
+ | PropertyChangeMask \
+ | ColormapChangeMask
+
+// | ButtonPressMask | ButtonRelaseMask
+//#define NC_EVENTS KeyPressMask \
+// | KeyReleaseMask \
+// | PointerMotionMask \
+// | EnterWindowMask \
+// | LeaveWindowMask \
+// | ExposureMask
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#define _GetDrawable() maFrameData.GetDrawable()
+#define _GetDisplay() maFrameData.pDisplay_
+#define _GetXDisplay() maFrameData.GetXDisplay()
+#define _GetColormap() maFrameData.GetColormap()
+#define _GetPaintRegion() maFrameData.GetPaintRegion()
+#define _GetStyle() maFrameData.nStyle_
+#define _IsMapped() maFrameData.bMapped_
+
+// -=-= C++ statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static long sal_CallbackDummy( void*, SalFrame*, USHORT, const void* )
+{ return 0; }
+
+// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+SalFrame *SalInstance::CreateFrame( SalFrame *pParent,
+ ULONG nSalFrameStyle )
+{
+ SalFrame *pFrame = new SalFrame;
+
+ pFrame->maFrameData.mpParent = pParent;
+ if( pParent )
+ pParent->maFrameData.maChildren.Insert( pFrame );
+ pFrame->maFrameData.Init( nSalFrameStyle );
+
+ return pFrame;
+}
+
+SalFrame* SalInstance::CreateChildFrame( SystemParentData* pParentData, ULONG nStyle )
+{
+ SalFrame* pFrame = new SalFrame;
+ pFrame->maFrameData.mpParent = NULL;
+ pFrame->maFrameData.Init( nStyle, pParentData );
+
+ return pFrame;
+}
+
+void SalInstance::DestroyFrame( SalFrame* pFrame )
+{
+ delete pFrame;
+}
+
+// -=-= SalGraphics / SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalGraphicsData::Init( SalFrame *pFrame )
+{
+ xColormap_ = &pFrame->_GetColormap();
+ hDrawable_ = pFrame->_GetDrawable();
+
+ bWindow_ = TRUE;
+
+ nPenPixel_ = GetPixel( nPenColor_ );
+ nTextPixel_ = GetPixel( nTextColor_ );
+ nBrushPixel_ = GetPixel( nBrushColor_ );
+}
+
+// -=-= SalFrame / SalFrameData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::Init( USHORT nSalFrameStyle, SystemParentData* pParentData )
+{
+ nStyle_ = nSalFrameStyle;
+
+ XWMHints Hints;
+ Hints.flags = 0;
+
+ if( nSalFrameStyle & SAL_FRAME_STYLE_DEFAULT )
+ {
+ hShell_ = pDisplay_->GetShellWidget();
+ hComposite_ = pDisplay_->GetWidget();
+
+ XSelectInput( GetXDisplay(), XtWindow( hShell_ ), CLIENT_EVENTS );
+ XSelectInput( GetXDisplay(), XtWindow( hComposite_ ), CLIENT_EVENTS );
+
+ Hints.flags |= InputHint|IconPixmapHint;
+ Hints.input = True;
+ Hints.icon_pixmap = GetAppIconPixmap( pDisplay_ );
+ Hints.icon_mask = GetAppIconMask( pDisplay_ );
+ if( Hints.icon_mask )
+ Hints.flags |= IconMaskHint;
+ }
+ else if( nSalFrameStyle & SAL_FRAME_STYLE_FLOAT )
+ {
+ Arg aArgs[10];
+ int nArgs = 0;
+
+ SalVisual* pVis = GetDisplay()->GetVisual();
+ XtSetArg( aArgs[nArgs], XtNvisual, pVis->GetVisual() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNdepth, pVis->GetDepth() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNcolormap,
+ GetDisplay()->GetColormap().GetXColormap() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNwidth, 10 ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNheight, 10 ); nArgs++;
+
+ hShell_ = XtAppCreateShell( NULL, NULL,
+ overrideShellWidgetClass,
+ pDisplay_->GetDisplay(),
+ aArgs, nArgs );
+
+ XtSetMappedWhenManaged( hShell_, FALSE );
+ XtRealizeWidget( hShell_ );
+
+ hComposite_ = XtVaCreateManagedWidget(
+ "ShellComposite",
+ SAL_COMPOSITE_WIDGET,
+ hShell_,
+ NULL );
+ XtRealizeWidget( hComposite_ );
+#ifdef DEBUG
+ fprintf( stderr, "created new FLOAT style shell\n" );
+#endif
+ }
+ else if( nSalFrameStyle & SAL_FRAME_STYLE_CHILD && pParentData )
+ {
+ int x_ret, y_ret;
+ unsigned int w, h, bw, d;
+ XLIB_Window aRoot;
+ XLIB_Window aParent;
+
+ XGetGeometry( GetDisplay()->GetDisplay(), pParentData->aWindow,
+ &aRoot, &x_ret, &y_ret, &w, &h, &bw, &d );
+
+ Arg aArgs[10];
+ int nArgs = 0;
+
+ SalVisual* pVis = GetDisplay()->GetVisual();
+ XtSetArg( aArgs[nArgs], XtNvisual, pVis->GetVisual() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNdepth, pVis->GetDepth() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNcolormap,
+ GetDisplay()->GetColormap().GetXColormap() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNwidth, w ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNheight, h ); nArgs++;
+
+ hShell_ = XtAppCreateShell( NULL, NULL,
+ overrideShellWidgetClass,
+ pDisplay_->GetDisplay(),
+ aArgs, nArgs );
+
+ XtSetMappedWhenManaged( hShell_, FALSE );
+ XtRealizeWidget( hShell_ );
+
+ XEvent aEvent;
+ XReparentWindow( GetDisplay()->GetDisplay(), XtWindow( hShell_ ),
+ pParentData->aWindow, 0, 0 );
+ GetDisplay()->GetXLib()->SetIgnoreXErrors( TRUE ); // hack for plugin
+ XSync( GetDisplay()->GetDisplay(), False );
+
+ while( ! XCheckTypedWindowEvent( GetDisplay()->GetDisplay(),
+ XtWindow( hShell_ ),
+ ReparentNotify,
+ &aEvent ) )
+ {
+ usleep(10000);
+ }
+
+ hComposite_ = XtVaCreateManagedWidget(
+ "ShellComposite",
+ SAL_COMPOSITE_WIDGET,
+ hShell_,
+ NULL );
+ XtRealizeWidget( hComposite_ );
+
+ hForeignParent_ = pParentData->aWindow;
+ // get foreign top level window
+ // we need the ConfigureNotifies of this window
+ // to update the positions of this frame's children of
+ // type SAL_FRAME_STYLE_FLOAT
+ aParent = hForeignParent_;
+ hForeignTopLevelWindow_ = hForeignParent_;
+ XLIB_Window* pChildren;
+ unsigned int nChildren;
+ do
+ {
+ XQueryTree( GetDisplay()->GetDisplay(), hForeignTopLevelWindow_,
+ &aRoot, &aParent, &pChildren, &nChildren );
+ XFree( pChildren );
+ if( aParent != aRoot )
+ hForeignTopLevelWindow_ = aParent;
+ } while( aParent != aRoot );
+
+ // check if this is really one of our own frames
+ // do not change the input mask in that case
+ SalFrame* pFrame = GetSalData()->pFirstFrame_;
+ while( pFrame &&
+ hForeignParent_ != pFrame->maFrameData.GetWindow() &&
+ hForeignParent_ != pFrame->maFrameData.GetShellWindow() )
+ pFrame = pFrame->maFrameData.pNextFrame_;
+
+ if( ! pFrame )
+ {
+ XSelectInput( GetDisplay()->GetDisplay(), hForeignParent_, StructureNotifyMask );
+ XSelectInput( GetDisplay()->GetDisplay(), hForeignTopLevelWindow_, StructureNotifyMask );
+ }
+
+ SetPosSize( Rectangle( Point( 0, 0 ), Size( w, h ) ) );
+ }
+ else
+ {
+ SalVisual *pVisual = pDisplay_->GetVisual();
+
+ int w = 500;
+ int h = 400;
+ if( pDisplay_->GetProperties() & PROPERTY_FEATURE_Maximize )
+ {
+ w = pDisplay_->GetScreenSize().Width();
+ h = pDisplay_->GetScreenSize().Height();
+ }
+
+ Arg aArgs[10];
+ int nArgs=0;
+ SalVisual* pVis = GetDisplay()->GetVisual();
+ XtSetArg( aArgs[nArgs], XtNvisual, pVis->GetVisual() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNdepth, pVis->GetDepth() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNcolormap,
+ GetDisplay()->GetColormap().GetXColormap() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNwidth, w ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNheight, h ); nArgs++;
+ if( mpParent )
+ XtSetArg( aArgs[nArgs], XtNtransientFor, mpParent->maFrameData.GetShellWidget() ), nArgs++;
+ if( ! ( nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) )
+ {
+ XtSetArg( aArgs[nArgs], XtNoverrideRedirect, True ); nArgs++;
+ }
+
+ hShell_ = XtAppCreateShell( "", "VCLSalFrame",
+ mpParent
+ ? transientShellWidgetClass :
+ applicationShellWidgetClass,
+ GetXDisplay(),
+ aArgs, nArgs );
+
+ // X-Window erzeugen
+ XtSetMappedWhenManaged( hShell_, FALSE );
+ XtRealizeWidget( hShell_ );
+
+ hComposite_ = XtVaCreateManagedWidget(
+ "ShellComposite",
+ SAL_COMPOSITE_WIDGET,
+ hShell_,
+ NULL );
+ XtRealizeWidget( hComposite_ );
+
+ XWMHints *pHints = XGetWMHints( GetXDisplay(),
+ pDisplay_->GetWindow() );
+
+ if( pHints
+ && pHints->flags & IconMaskHint
+ && pHints->flags & IconPixmapHint )
+ {
+ Hints.flags |= IconMaskHint|IconPixmapHint;
+ Hints.icon_pixmap = pHints->icon_pixmap;
+ Hints.icon_mask = pHints->icon_mask;
+ XFree( pHints );
+ }
+ else
+ {
+ Hints.flags |= IconPixmapHint;
+ Hints.icon_pixmap = GetAppIconPixmap( pDisplay_ );
+ Hints.icon_mask = GetAppIconMask( pDisplay_ );
+ if( Hints.icon_mask )
+ Hints.flags |= IconMaskHint;
+ }
+
+ Hints.flags |= WindowGroupHint;
+ Hints.window_group = pDisplay_->GetShellWindow();
+
+ }
+
+ if( hShell_ )
+ XSetWindowBackgroundPixmap( pDisplay_->GetDisplay(), XtWindow( hShell_ ), None );
+ if( hComposite_ )
+ XSetWindowBackgroundPixmap( pDisplay_->GetDisplay(), XtWindow( hComposite_ ), None );
+
+ if( ! ( nSalFrameStyle & SAL_FRAME_STYLE_CHILD && pParentData ) )
+ {
+ XSetWMHints( GetXDisplay(), XtWindow( hShell_ ), &Hints );
+
+
+ // WM Protocols && internals
+ Atom a[4];
+ int n = 0;
+
+ a[n++] = pDisplay_->GetICCCM().aWM_DeleteWindow_;
+ a[n++] = pDisplay_->GetICCCM().aWM_SaveYourself_;
+
+ XSetWMProtocols( GetXDisplay(), XtWindow( hShell_ ), a, n );
+ }
+
+ // Pointer
+ pFrame_->SetPointer( POINTER_ARROW );
+
+ // Setup for use of InputMethod
+ if ( nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE
+ && nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE )
+ {
+ mpInputContext = new SalI18N_InputContext( pFrame_ );
+ if ( mpInputContext->UseContext() )
+ {
+ mpInputContext->ExtendEventMask( XtWindow( hShell_ ) );
+ mpInputContext->Unmap();
+ }
+ }
+ else
+ {
+ mpInputContext = NULL;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+inline SalFrameData::SalFrameData( SalFrame *pFrame )
+{
+ SalData* pSalData = GetSalData();
+
+ // insert frame in framelist
+ pNextFrame_ = pSalData->pFirstFrame_;
+ pSalData->pFirstFrame_ = pFrame;
+ pFrame_ = pFrame;
+
+ pProc_ = sal_CallbackDummy;
+ pInst_ = (void*)ILLEGAL_POINTER;
+
+ pDisplay_ = pSalData->GetCurDisp();
+ hShell_ = NULL;
+ hComposite_ = NULL;
+ hForeignParent_ = None;
+ hNoFullscreenShell_ = NULL;
+ hNoFullscreenComposite_ = NULL;
+
+ pGraphics_ = NULL;
+ pFreeGraphics_ = NULL;
+ pPaintRegion_ = NULL;
+
+ hCursor_ = None;
+ nCaptured_ = 0;
+
+ nReleaseTime_ = 0;
+ nKeyCode_ = 0;
+ nKeyState_ = 0;
+ nCompose_ = -1;
+
+ nShowState_ = SHOWSTATE_UNKNOWN;
+ nLeft_ = 0;
+ nTop_ = 0;
+ nRight_ = 0;
+ nBottom_ = 0;
+ nMaxWidth_ = 0;
+ nMaxHeight_ = 0;
+ nWidth_ = 0;
+ nHeight_ = 0;
+ nStyle_ = 0;
+ bAlwaysOnTop_ = FALSE;
+ // #58928# fake to be mapped on startup, because the sclient may be
+ // resized before mapping and the
+ // SetPosSize / call(salevent_resize) / GetClientSize
+ // stuff will not work in that (unmapped) case
+ bViewable_ = TRUE;
+ bMapped_ = FALSE;
+ bDefaultPosition_ = TRUE;
+ nVisibility_ = VisibilityFullyObscured;
+
+ nScreenSaversTimeout_ = 0;
+
+ mpInputContext = NULL;
+}
+
+SalFrame::SalFrame() : maFrameData( this ) {}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+inline SalFrameData::~SalFrameData()
+{
+ if ( mpInputContext != NULL )
+ delete mpInputContext;
+
+ if( pGraphics_ )
+ {
+ stderr0( "SalFrameData::~SalFrameData pGraphics_\n" );
+ pGraphics_->maGraphicsData.DeInit();
+ delete pGraphics_;
+ }
+
+ if( pFreeGraphics_ )
+ {
+ pFreeGraphics_->maGraphicsData.DeInit();
+ delete pFreeGraphics_;
+ }
+
+ if( hShell_ != pDisplay_->GetWidget() )
+ XtDestroyWidget( hShell_ );
+
+ SalData* pSalData = GetSalData();
+
+ if( pFrame_ == pSalData->pFirstFrame_ )
+ pSalData->pFirstFrame_ = GetNextFrame();
+ else
+ {
+ SalFrameData *pTemp = &pSalData->pFirstFrame_->maFrameData;
+ while( pTemp->GetNextFrame() != pFrame_ )
+ pTemp = &pTemp->GetNextFrame()->maFrameData;
+
+ pTemp->pNextFrame_ = GetNextFrame();
+ }
+}
+
+SalFrame::~SalFrame()
+{
+ // aus papis child liste entfernen
+ if( maFrameData.mpParent )
+ maFrameData.mpParent->maFrameData.maChildren.Remove( this );
+ // einige kommen trotzdem immer noch durch
+ XSelectInput( _GetXDisplay(), maFrameData.GetShellWindow(), 0 );
+ XSelectInput( _GetXDisplay(), maFrameData.GetWindow(), 0 );
+
+ ShowFullScreen( FALSE );
+
+ if( _IsMapped() )
+ Show( FALSE );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// irgendwann auf Liste umstellen
+
+const SystemChildData* SalFrame::GetSystemData() const
+{
+ SalFrame *pFrame = const_cast<SalFrame*>(this);
+ pFrame->maFrameData.maSystemChildData.nSize = sizeof( SystemChildData );
+ pFrame->maFrameData.maSystemChildData.pDisplay = _GetXDisplay();
+ pFrame->maFrameData.maSystemChildData.aWindow = pFrame->maFrameData.GetWindow();
+ pFrame->maFrameData.maSystemChildData.pSalFrame = pFrame;
+ pFrame->maFrameData.maSystemChildData.pWidget = pFrame->maFrameData.GetWidget();
+ pFrame->maFrameData.maSystemChildData.pVisual = _GetDisplay()->GetVisual()->GetVisual();
+ pFrame->maFrameData.maSystemChildData.nDepth = _GetDisplay()->GetVisual()->GetDepth();
+ pFrame->maFrameData.maSystemChildData.aColormap = _GetDisplay()->GetColormap().GetXColormap();
+ pFrame->maFrameData.maSystemChildData.pAppContext = _GetDisplay()->GetXLib()->GetAppContext();
+ return &maFrameData.maSystemChildData;
+}
+
+SalGraphics *SalFrameData::GetGraphics()
+{
+ if( pGraphics_ )
+ return NULL;
+
+ if( pFreeGraphics_ )
+ {
+ pGraphics_ = pFreeGraphics_;
+ pFreeGraphics_ = NULL;
+ }
+ else
+ {
+ pGraphics_ = new SalGraphics;
+ pGraphics_->maGraphicsData.Init( pFrame_ );
+ }
+
+ return pGraphics_;
+}
+
+SalGraphics *SalFrame::GetGraphics()
+{ return maFrameData.GetGraphics(); }
+
+void SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
+{
+ if( pGraphics != maFrameData.pGraphics_ )
+ {
+ stderr0( "SalFrame::ReleaseGraphics pGraphics!=pGraphics_" );
+ return;
+ }
+
+ maFrameData.pFreeGraphics_ = pGraphics;
+ maFrameData.pGraphics_ = NULL;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+void SalFrame::Enable( BOOL bEnable )
+{
+ // NYI: enable/disable frame
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+void SalFrame::SetIcon( USHORT nIcon )
+{
+ // NYI: set a specific icon
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+void SalFrame::SetMinClientSize( long nWidth, long nHeight )
+{
+ if( maFrameData.hShell_ )
+ {
+ Arg args[10];
+ int n = 0;
+ XtSetArg( args[n++], XtNminWidth, nWidth );
+ XtSetArg( args[n++], XtNminHeight, nHeight );
+ XtSetValues( maFrameData.hShell_, args, n );
+ }
+}
+
+// Show + Pos (x,y,z) + Size (width,height)
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::Show( BOOL bVisible )
+{
+ maFrameData.bMapped_ = bVisible;
+ maFrameData.bViewable_ = bVisible;
+ if( bVisible )
+ {
+ if( maFrameData.nStyle_ & ( SAL_FRAME_STYLE_CHILD | SAL_FRAME_STYLE_FLOAT ) )
+ XtPopup( maFrameData.hShell_, XtGrabNone );
+ else
+ XtMapWidget( maFrameData.hShell_ );
+ // Manch ein WM verschluckt Key Events im Fullscreenmode ...
+ XSelectInput( _GetXDisplay(), maFrameData.GetShellWindow(), CLIENT_EVENTS );
+ XSelectInput( _GetXDisplay(), maFrameData.GetWindow(), CLIENT_EVENTS );
+
+ if( !maFrameData.aPosSize_.IsEmpty()
+ && (maFrameData.nWidth_ != maFrameData.aPosSize_.GetWidth()
+ || maFrameData.nHeight_ != maFrameData.aPosSize_.GetHeight()) )
+ {
+ maFrameData.nWidth_ = maFrameData.aPosSize_.GetWidth();
+ maFrameData.nHeight_ = maFrameData.aPosSize_.GetHeight();
+
+ maFrameData.Call( SALEVENT_RESIZE, NULL );
+ }
+
+ if( !_GetStyle() || maFrameData.hNoFullscreenShell_ )
+ {
+ XSync( _GetXDisplay(), False );
+ XSetInputFocus( _GetXDisplay(), maFrameData.GetShellWindow(), RevertToNone, CurrentTime );
+ }
+
+ XSync( _GetXDisplay(), False );
+ maFrameData.Call( SALEVENT_RESIZE, NULL );
+ }
+ else
+ {
+ if( maFrameData.nStyle_ & ( SAL_FRAME_STYLE_CHILD | SAL_FRAME_STYLE_FLOAT ) )
+ XtPopdown( maFrameData.hShell_ );
+ else
+ XtUnmapWidget( maFrameData.hShell_ );
+
+ if( !_GetStyle() || maFrameData.hNoFullscreenShell_ )
+ {
+ SalFrameData *pTemp = &GetSalData()->pFirstFrame_->maFrameData;
+ while( pTemp )
+ {
+ if( &maFrameData != pTemp
+ && _GetDisplay() == pTemp->pDisplay_
+ && SHOWSTATE_NORMAL == pTemp->nShowState_
+ && pTemp->bMapped_ )
+ {
+ /* #62634# */
+ XWindowAttributes window_attributes;
+ XGetWindowAttributes( _GetXDisplay(),
+ XtWindow( pTemp->hShell_ ), &window_attributes);
+ /* racing condition, we called ::Show(1), but the
+ * window may not be ready (i.e. bMapped_ != map_state) */
+ if ( window_attributes.map_state != IsViewable )
+ {
+ XtMapWidget( pTemp->hShell_ );
+ XSync( _GetXDisplay(), False );
+ }
+
+ /* #69412# double check whether the window is successfully mapped,
+ since fvwm2 prohibits the mapping of the initial frame, depending
+ on its window positioning policy for new windows */
+ XGetWindowAttributes( _GetXDisplay(), XtWindow( pTemp->hShell_ ), &window_attributes);
+ if ( window_attributes.map_state == IsViewable )
+ {
+ XSetInputFocus( _GetXDisplay(), XtWindow( pTemp->hShell_ ) ,
+ RevertToNone, CurrentTime );
+ }
+ break;
+ }
+ pTemp = &pTemp->pNextFrame_->maFrameData;
+ }
+ }
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+beta void SalFrame::ToTop( USHORT nFlags )
+{
+ int i;
+ // if one of our children is in fullscreen mode, ignore the to top
+ // and raise it instead. This will not work for grandchildren
+ // #58714#
+ for( i = 0; i < maFrameData.maChildren.Count(); i++ )
+ {
+ Widget pChild = maFrameData.maChildren.GetObject( i )->
+ maFrameData.hNoFullscreenShell_;
+ if( pChild )
+ {
+ XRaiseWindow( _GetXDisplay(), XtWindow( pChild ) );
+ return;
+ }
+ }
+
+ if( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
+ XtMapWidget( maFrameData.hShell_ );
+
+ XRaiseWindow( _GetXDisplay(), maFrameData.GetShellWindow() );
+ for( i=0; i < maFrameData.maChildren.Count(); i++ )
+ maFrameData.maChildren.GetObject( i )->ToTop( nFlags );
+ //XSetInputFocus( _GetXDisplay(), _GetShellWindow(), RevertToNone, CurrentTime );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::GetClientSize( long &rWidth, long &rHeight )
+{
+ if( ! maFrameData.bViewable_ && ! maFrameData.hNoFullscreenShell_ )
+ {
+ rWidth = rHeight = 0;
+ return;
+ }
+
+ rWidth = maFrameData.aPosSize_.GetWidth();
+ rHeight = maFrameData.aPosSize_.GetHeight();
+
+ if( !rWidth || !rHeight )
+ {
+ if( SHOWSTATE_UNKNOWN != maFrameData.nShowState_ ) abort();
+
+ XWindowAttributes aAttrib;
+
+ XGetWindowAttributes( _GetXDisplay(), maFrameData.GetShellWindow(), &aAttrib );
+
+ rWidth = aAttrib.width;
+ rHeight = aAttrib.height;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::SetClientSize( long nWidth, long nHeight )
+{
+ if( maFrameData.nStyle_ & SAL_FRAME_STYLE_CHILD )
+ return;
+
+ if( maFrameData.nStyle_ & SAL_FRAME_STYLE_FLOAT )
+ {
+ maFrameData.SetPosSize( Rectangle(
+ Point( maFrameData.aPosSize_.Left(), maFrameData.aPosSize_.Top() ),
+ Size( nWidth, nHeight ) ) );
+ return;
+ }
+
+ XLIB_Window aDummy;
+ int nX, nY, nScreenWidth, nScreenHeight;
+
+ nScreenWidth = _GetDisplay()->GetScreenSize().Width();
+ nScreenHeight = _GetDisplay()->GetScreenSize().Height();
+
+ XTranslateCoordinates ( _GetXDisplay(), maFrameData.GetShellWindow(),
+ _GetDisplay()->GetRootWindow(), 0, 0, &nX, &nY,
+ &aDummy );
+
+ if ( maFrameData.bDefaultPosition_ )
+ {
+ // center the application window
+
+ nX = (nScreenWidth - nWidth ) / 2;
+ nY = (nScreenHeight - nHeight) / 2;
+
+ maFrameData.bDefaultPosition_ = False;
+ }
+ else
+ {
+ // once centered, we leave the window where it is with new size
+ // but only if it does not run out of screen
+
+ if ( nX + nWidth > nScreenWidth ) nX = nScreenWidth - nWidth;
+ if ( nY + nHeight > nScreenHeight ) nY = nScreenHeight - nHeight;
+ if ( nX < 0 ) nX = 0;
+ if ( nY < 20 ) nY = 20;// guess size of top window
+ // decoration is 20
+ }
+
+ Size aSize ( nWidth, nHeight );
+ Point aPoint ( nX, nY );
+ maFrameData.SetPosSize( Rectangle ( aPoint, aSize ) );
+}
+
+#if 0
+void SalFrame::SetClientPosSize( const Rectangle& rRect )
+{
+ if( maFrameData.nStyle_ & SAL_FRAME_STYLE_CHILD )
+ return;
+
+ maFrameData.SetPosSize( rRect );
+}
+#endif
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::SetAlwaysOnTop( BOOL bOnTop )
+{
+ // #74406# do not raise fullscreenwindow since it may override the
+ // screenlocker
+ // maFrameData.bAlwaysOnTop_ = bOnTop;
+ if( bOnTop )
+ XRaiseWindow( _GetXDisplay(), maFrameData.GetShellWindow() );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::SetWindowState( const SalFrameState *pState )
+{
+ int nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0 ;
+ int nHeight = pState->mnHeight > 0 ? pState->mnHeight - 1 : 0 ;
+
+ Rectangle aPosSize = Rectangle( pState->mnX,
+ pState->mnY,
+ pState->mnX + nWidth,
+ pState->mnY + nHeight );
+
+ maFrameData.SetPosSize( aPosSize );
+
+ if( pState->mnState & SAL_FRAMESTATE_MAXIMIZED )
+ {
+ maFrameData.nShowState_ = SHOWSTATE_NORMAL;
+ maFrameData.Maximize();
+ }
+ if( pState->mnState & SAL_FRAMESTATE_MINIMIZED )
+ {
+ if ( maFrameData.nShowState_ == SHOWSTATE_UNKNOWN )
+ maFrameData.nShowState_ = SHOWSTATE_NORMAL;
+ maFrameData.Minimize();
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+BOOL SalFrame::GetWindowState( SalFrameState* pState )
+{
+ if( SHOWSTATE_MINIMIZED == maFrameData.nShowState_ )
+ pState->mnState = SAL_FRAMESTATE_MINIMIZED;
+ else
+ pState->mnState = 0;
+
+ Rectangle aPosSize;
+ if( !maFrameData.aRestoreMaximize_.IsEmpty() )
+ {
+ aPosSize = maFrameData.aRestoreMaximize_;
+ pState->mnState |= SAL_FRAMESTATE_MAXIMIZED;
+ }
+ else
+ maFrameData.GetPosSize( aPosSize );
+
+ pState->mnX = aPosSize.Left();
+ pState->mnY = aPosSize.Top();
+ pState->mnWidth = aPosSize.GetWidth();
+ pState->mnHeight = aPosSize.GetHeight();
+
+ return TRUE;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::GetPosSize( Rectangle &rPosSize )
+{
+ if( aPosSize_.IsEmpty() )
+ {
+ long w = nMaxWidth_
+ ? nMaxWidth_
+ : pDisplay_->GetScreenSize().Width() - nLeft_ - nRight_;
+ long h = nMaxHeight_
+ ? nMaxHeight_
+ : pDisplay_->GetScreenSize().Height() - nTop_ - nBottom_;
+
+ rPosSize = Rectangle( Point( nLeft_, nTop_ ), Size( w, h ) );
+ }
+ else
+ rPosSize = aPosSize_;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::SetSize( const Size &rSize )
+{
+ XWindowChanges values;
+ values.width = rSize.Width();
+ values.height = rSize.Height();
+ if (values.width > 0 && values.height > 0)
+ {
+ Arg args[10];
+ int n = 0;
+ XtSetArg(args[n], XtNheight, rSize.Height()); n++;
+ XtSetArg(args[n], XtNwidth, rSize.Width()); n++;
+ XtSetValues( hShell_, args, n );
+
+ if( ! ( nStyle_ & ( SAL_FRAME_STYLE_CHILD | SAL_FRAME_STYLE_FLOAT ) ) )
+ MarkWindowAsGoodPositioned( XtWindow( hShell_ ) );
+
+ aPosSize_.Right() = aPosSize_.Left() + rSize.Width() - 1;
+ aPosSize_.Bottom() = aPosSize_.Top() + rSize.Height() - 1;
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::SetPosSize( const Rectangle &rPosSize )
+{
+ XWindowChanges values;
+ values.x = rPosSize.Left();
+ values.y = rPosSize.Top();
+ values.width = rPosSize.GetWidth();
+ values.height = rPosSize.GetHeight();
+
+ if ( !values.width || !values.height )
+ return;
+
+ if( ! ( nStyle_ & ( SAL_FRAME_STYLE_CHILD | SAL_FRAME_STYLE_FLOAT ) ) )
+ {
+ MarkWindowAsGoodPositioned( XtWindow( hShell_ ) );
+
+ if( !(pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_ClientPos) )
+ {
+ values.x -= nLeft_;
+ values.y -= nTop_;
+ }
+ }
+ if( ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mpParent )
+ {
+ XLIB_Window aChild;
+ // coordinates are relative to parent, so translate to root coordinates
+ XTranslateCoordinates( GetDisplay()->GetDisplay(),
+ mpParent->maFrameData.GetWindow(),
+ GetDisplay()->GetRootWindow(),
+ values.x, values.y,
+ &values.x, &values.y,
+ & aChild );
+ }
+
+ Arg args[10];
+ int n = 0;
+ XtSetArg(args[n], XtNheight, values.height); n++;
+ XtSetArg(args[n], XtNwidth, values.width); n++;
+ XtSetArg(args[n], XtNx, values.x); n++;
+ XtSetArg(args[n], XtNy, values.y); n++;
+ XtSetValues( hShell_, args, n );
+
+ if ( aPosSize_ != rPosSize )
+ {
+ aPosSize_ = rPosSize;
+ Call ( SALEVENT_RESIZE, NULL );
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::Minimize()
+{
+ if( SHOWSTATE_UNKNOWN == nShowState_ )
+ {
+ stderr0( "SalFrameData::Minimize SHOWSTATE_UNKNOWN\n" );
+ return;
+ }
+
+ if( hNoFullscreenShell_ )
+ XtUnmapWidget( hNoFullscreenShell_ );
+ if( XIconifyWindow( GetXDisplay(),
+ XtWindow( hShell_ ),
+ pDisplay_->GetScreenNumber() ) )
+ nShowState_ = SHOWSTATE_MINIMIZED;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::Maximize()
+{
+ if( SHOWSTATE_UNKNOWN == nShowState_ )
+ {
+ stderr0( "SalFrameData::Maximize SHOWSTATE_UNKNOWN\n" );
+ return;
+ }
+
+ if( SHOWSTATE_MINIMIZED == nShowState_ )
+ {
+ if( hNoFullscreenShell_ )
+ XtMapWidget( hNoFullscreenShell_ );
+ XtMapWidget( hShell_ );
+ nShowState_ = SHOWSTATE_NORMAL;
+ }
+
+ if( aRestoreMaximize_.IsEmpty() )
+ aRestoreMaximize_ = aPosSize_;
+
+ if( pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_Screen )
+ {
+ long w = nMaxWidth_
+ ? nMaxWidth_
+ : pDisplay_->GetScreenSize().Width() - nLeft_ - nRight_;
+ long h = nMaxHeight_
+ ? nMaxHeight_
+ : pDisplay_->GetScreenSize().Height() - nTop_ - nBottom_;
+
+ SetPosSize( Rectangle( Point( nLeft_, nTop_), Size( w, h ) ) );
+ }
+ else
+ {
+ Display *pDisplay = GetXDisplay();
+ XLIB_Window hRoot = pDisplay_->GetRootWindow();
+ XLIB_Window *Children, hDummy;
+ unsigned int nChildren, n;
+
+ // simulate WM-Maximize: clip iconbars
+ int nW = pDisplay_->GetScreenSize().Width();
+ int nH = pDisplay_->GetScreenSize().Height();
+
+ XRectangle aRect;
+ XLIB_Region pXRegA = XCreateRegion();
+
+ aRect.x = 0;
+ aRect.y = 0;
+ aRect.width = nW;
+ aRect.height = nH;
+
+ XUnionRectWithRegion( &aRect, pXRegA, pXRegA );
+
+ XQueryTree( pDisplay,
+ hRoot,
+ &hRoot,
+ &hDummy,
+ &Children,
+ &nChildren );
+
+ SalXLib *pXLib = GetSalData()->GetLib();
+ BOOL bOld = pXLib->GetIgnoreXErrors();
+
+ for( n = 0; n < nChildren; n++ )
+ {
+ XWindowAttributes aAttrib;
+
+ pXLib->SetIgnoreXErrors( TRUE ); // reset WasXError
+
+ XGetWindowAttributes( pDisplay, Children[n], &aAttrib );
+
+ aRect.x = aAttrib.x;
+ aRect.y = aAttrib.y;
+ aRect.width = aAttrib.width;
+ aRect.height = aAttrib.height;
+
+ if( !pXLib->WasXError()
+ && aAttrib.map_state == IsViewable
+ && (!aRect.x
+ || !aRect.y
+ || aRect.x + aRect.width == nW
+ || aRect.y + aRect.height == nH)
+ && aRect.width * aRect.height < (nW * nH) / 5 )
+ {
+ XLIB_Region pXRegB = XCreateRegion();
+
+ XUnionRectWithRegion( &aRect, pXRegB, pXRegB );
+ XSubtractRegion( pXRegA, pXRegB, pXRegA );
+
+ XDestroyRegion( pXRegB );
+ }
+ }
+
+ pXLib->SetIgnoreXErrors( bOld );
+
+ XClipBox( pXRegA, &aRect );
+
+ XDestroyRegion( pXRegA );
+
+ if( aRect.width * aRect.height > (nW * nH) / 2 )
+ {
+ Rectangle aPosSize( aRect.x + nLeft_,
+ aRect.y + nTop_,
+ aRect.x + aRect.width - 1 - nRight_,
+ aRect.y + aRect.height - 1 - nBottom_ );
+
+ SetPosSize( aPosSize );
+ }
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::Restore()
+{
+ if( SHOWSTATE_UNKNOWN == nShowState_ )
+ {
+ stderr0( "SalFrameData::Restore SHOWSTATE_UNKNOWN\n" );
+ return;
+ }
+
+ if( SHOWSTATE_MINIMIZED == nShowState_ )
+ {
+ if( hNoFullscreenShell_ )
+ XtMapWidget( hNoFullscreenShell_ );
+ XtMapWidget( hShell_ );
+ nShowState_ = SHOWSTATE_NORMAL;
+ }
+
+ if( !aRestoreMaximize_.IsEmpty() )
+ {
+ SetPosSize( aRestoreMaximize_ );
+ aRestoreMaximize_ = Rectangle();
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrameData::ShowFullScreen( BOOL bFullScreen )
+{
+ if( aRestoreFullScreen_.IsEmpty() == !bFullScreen )
+ return;
+
+ const Size &aScreenSize( pDisplay_->GetScreenSize() );
+
+ long supplied;
+ XSizeHints hints;
+ if( !XGetWMNormalHints( GetXDisplay(), XtWindow( hShell_ ), &hints, &supplied ) )
+ hints.flags = supplied = 0;
+
+ if( bFullScreen )
+ {
+ GetPosSize( aRestoreFullScreen_ );
+
+ SalVisual *pVisual = pDisplay_->GetVisual();
+
+ hNoFullscreenShell_ = hShell_;
+ hNoFullscreenComposite_ = hComposite_;
+
+ XWithdrawWindow( GetXDisplay(), XtWindow( hNoFullscreenShell_ ),
+ GetDisplay()->GetScreenNumber() );
+
+ Arg aArgs[10];
+ int nArgs=0;
+ SalVisual* pVis = GetDisplay()->GetVisual();
+ XtSetArg( aArgs[nArgs], XtNvisual, pVis->GetVisual() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNdepth, pVis->GetDepth() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNcolormap,
+ GetDisplay()->GetColormap().GetXColormap() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNx, 0 ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNy, 0 ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNwidth, aScreenSize.Width() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNheight, aScreenSize.Height() ); nArgs++;
+ XtSetArg( aArgs[nArgs], XtNoverrideRedirect, True ); nArgs++;
+ hShell_ = XtAppCreateShell(
+ "VCLFullScreenShell", "VCLFullScreenFrame",
+ applicationShellWidgetClass,
+ GetXDisplay(),
+ aArgs, nArgs );
+ XtRealizeWidget( hShell_ );
+
+ hComposite_ = XtVaCreateManagedWidget(
+ "ShellComposite",
+ SAL_COMPOSITE_WIDGET,
+ hShell_,
+ NULL );
+ XtRealizeWidget( hComposite_ );
+
+ if( pGraphics_ )
+ pGraphics_->maGraphicsData.SetDrawable( XtWindow( hComposite_ ) );
+
+ delete pFreeGraphics_;
+ pFreeGraphics_ = NULL;
+
+ if( bMapped_ )
+ {
+ pFrame_->Show( TRUE );
+ XSetInputFocus( GetXDisplay(), XtWindow( hShell_ ),
+ RevertToNone, CurrentTime );
+ }
+
+ if ( WMSupportsFWS(GetXDisplay(), pDisplay_->GetRootWindow()) )
+ {
+ AddFwsProtocols( GetXDisplay(), XtWindow(hShell_) );
+ RegisterFwsWindow( GetXDisplay(), XtWindow(hShell_) );
+ }
+
+ aPosSize_ = Rectangle( Point( 0, 0 ), aScreenSize );
+ nWidth_ = aPosSize_.GetWidth();
+ nHeight_ = aPosSize_.GetHeight();
+
+ if ( mpInputContext != NULL )
+ {
+ delete mpInputContext;
+ mpInputContext = new SalI18N_InputContext( pFrame_ );
+ }
+ Call( SALEVENT_RESIZE, NULL );
+ }
+ else
+ {
+ if( pGraphics_ )
+ pGraphics_->maGraphicsData.SetDrawable( XtWindow( hNoFullscreenComposite_ ) );
+
+ delete pFreeGraphics_;
+ pFreeGraphics_ = NULL;
+
+ if ( mpInputContext != NULL )
+ delete mpInputContext;
+
+ XtDestroyWidget( hComposite_ );
+ XtDestroyWidget( hShell_ );
+
+ hComposite_ = hNoFullscreenComposite_;
+ hShell_ = hNoFullscreenShell_;
+
+ hNoFullscreenShell_ = None;
+ hNoFullscreenComposite_ = None;
+
+ if( bMapped_ )
+ pFrame_->Show( TRUE );
+ if ( mpInputContext != NULL )
+ {
+ mpInputContext = new SalI18N_InputContext( pFrame_ );
+ if ( bMapped_ )
+ mpInputContext->SetICFocus();
+ else
+ mpInputContext->Unmap();
+ }
+
+ SetPosSize( aRestoreFullScreen_ );
+ // SetPosSize macht Call( SALEVENT_RESIZE );
+ aRestoreFullScreen_ = Rectangle();
+ nWidth_ = aPosSize_.GetWidth();
+ nHeight_ = aPosSize_.GetHeight();
+ }
+}
+
+void SalFrame::ShowFullScreen( BOOL bFullScreen )
+{ maFrameData.ShowFullScreen( bFullScreen ); }
+
+/* ---------------------------------------------------------------------
+ the xautolock pseudo screen saver needs special treatment since it
+ doesn't cooperate with XxxxScreenSaver settings
+ ------------------------------------------------------------------- */
+
+static Bool
+IsRunningXAutoLock( Display *p_display, XLIB_Window a_window )
+{
+ const char *p_atomname = "XAUTOLOCK_SEMAPHORE_PID";
+ Atom a_pidatom;
+
+ // xautolock interns this atom
+ a_pidatom = XInternAtom( p_display, p_atomname, True );
+ if ( a_pidatom == None )
+ return False;
+
+ Atom a_type;
+ int n_format;
+ unsigned long n_items;
+ unsigned long n_bytes_after;
+ pid_t *p_pid;
+ pid_t n_pid;
+ // get pid of running xautolock
+ XGetWindowProperty (p_display, a_window, a_pidatom, 0L, 2L, False,
+ AnyPropertyType, &a_type, &n_format, &n_items, &n_bytes_after,
+ (unsigned char**) &p_pid );
+ n_pid = *p_pid;
+ XFree( p_pid );
+
+ if ( a_type == XA_INTEGER )
+ {
+ // check if xautolock pid points to a running process
+ if ( kill(n_pid, 0) == -1 )
+ return False;
+ else
+ return True;
+ }
+
+ return False;
+}
+
+/* definitions from xautolock.c (pl15) */
+#define XAUTOLOCK_DISABLE 1
+#define XAUTOLOCK_ENABLE 2
+
+static Bool
+MessageToXAutoLock( Display *p_display, int n_message )
+{
+ const char *p_atomname = "XAUTOLOCK_MESSAGE" ;
+ Atom a_messageatom;
+ XLIB_Window a_rootwindow;
+
+ a_rootwindow = RootWindowOfScreen( ScreenOfDisplay(p_display, 0) );
+ if ( ! IsRunningXAutoLock(p_display, a_rootwindow) )
+ {
+ // remove any pending messages
+ a_messageatom = XInternAtom( p_display, p_atomname, True );
+ if ( a_messageatom != None )
+ XDeleteProperty( p_display, a_rootwindow, a_messageatom );
+ return False;
+ }
+
+ a_messageatom = XInternAtom( p_display, p_atomname, False );
+ XChangeProperty (p_display, a_rootwindow, a_messageatom, XA_INTEGER,
+ 8, PropModeReplace, (unsigned char*)&n_message, sizeof(n_message) );
+
+ return True;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::StartPresentation( BOOL bStart )
+{
+ if ( bStart )
+ MessageToXAutoLock( _GetXDisplay(), XAUTOLOCK_DISABLE );
+ else
+ MessageToXAutoLock( _GetXDisplay(), XAUTOLOCK_ENABLE );
+
+ if( bStart || maFrameData.nScreenSaversTimeout_ )
+ {
+ int timeout, interval, prefer_blanking, allow_exposures;
+ XGetScreenSaver( _GetXDisplay(),
+ &timeout,
+ &interval,
+ &prefer_blanking,
+ &allow_exposures );
+ if( !bStart )
+ {
+ XSetScreenSaver( _GetXDisplay(),
+ maFrameData.nScreenSaversTimeout_,
+ interval,
+ prefer_blanking,
+ allow_exposures );
+ maFrameData.nScreenSaversTimeout_ = 0;
+ }
+ else if( timeout )
+ {
+ maFrameData.nScreenSaversTimeout_ = timeout;
+ XResetScreenSaver( _GetXDisplay() );
+ XSetScreenSaver( _GetXDisplay(),
+ 0,
+ interval,
+ prefer_blanking,
+ allow_exposures );
+ }
+ }
+}
+
+// Pointer
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+inline void SalFrameData::SetPointer( PointerStyle ePointerStyle )
+{
+ hCursor_ = pDisplay_->GetPointer( ePointerStyle );
+ XDefineCursor( GetXDisplay(), XtWindow( hComposite_ ), hCursor_ );
+
+ if( IsCaptured() )
+ XChangeActivePointerGrab( GetXDisplay(),
+ PointerMotionMask|ButtonPressMask|ButtonReleaseMask,
+ hCursor_,
+ CurrentTime );
+}
+
+void SalFrame::SetPointer( PointerStyle ePointerStyle )
+{ maFrameData.SetPointer( ePointerStyle ); }
+
+void SalFrame::CaptureMouse( BOOL bCapture )
+{ maFrameData.CaptureMouse( bCapture ); }
+
+void SalFrame::SetPointerPos( long nX, long nY )
+{ XWarpPointer( _GetXDisplay(), None, maFrameData.GetShellWindow(), 0, 0, 0, 0, nX, nY ); }
+
+// PostEvent
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+BOOL SalFrame::PostEvent( void *pData )
+{
+ _GetDisplay()->SendEvent( _GetDisplay()->GetICCCM().aUserEvent_,
+ pData,
+ maFrameData.GetWindow() );
+ return TRUE;
+}
+
+// Title
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::SetTitle( const XubString& rTitle )
+{
+ ByteString aByteTitle( rTitle, gsl_getSystemTextEncoding() );
+
+ char* pTitle = (char*)aByteTitle.GetBuffer();
+ XTextProperty aTitle;
+
+ if( !XStringListToTextProperty( &pTitle, 1, &aTitle ) )
+ {
+ fprintf( stderr, "SalFrame::SetTitle !XStringListToTextProperty(%s)\n",
+ pTitle );
+ abort();
+ }
+
+ XSetWMName ( _GetXDisplay(), maFrameData.GetShellWindow(), &aTitle );
+ XSetWMIconName( _GetXDisplay(), maFrameData.GetShellWindow(), &aTitle );
+
+ XFree( aTitle.value );
+}
+
+// -----------------------------------------------------------------------
+
+void SalFrame::Flush()
+{
+ XFlush( _GetDisplay()->GetDisplay() );
+}
+
+// -----------------------------------------------------------------------
+
+void SalFrame::Sync()
+{
+ XSync( _GetDisplay()->GetDisplay(), False );
+}
+
+// Keyboard
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+// -----------------------------------------------------------------------
+
+void SalFrame::SetInputContext( SalInputContext* pContext )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SalFrame::UpdateExtTextInputArea()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SalFrame::EndExtTextInput( USHORT nFlags )
+{
+ maFrameData.mpInputContext->EndExtTextInput( nFlags );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SalFrame::GetKeyName( USHORT nKeyCode )
+{
+ return _GetDisplay()->GetKeyName( nKeyCode );
+}
+
+XubString SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
+{
+ return GetKeyName( nKeyCode );
+}
+
+// Settings
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+inline Color getColorFromLong( long nColor )
+{
+ return Color( (nColor & 0xff), (nColor & 0xff00)>>8, (nColor & 0xff0000)>>16);
+}
+
+void SalFrame::UpdateSettings( AllSettings& rSettings )
+{
+
+ static SystemLookInfo aInfo;
+ static BOOL bHaveInfo = FALSE;
+ static BOOL bInit = FALSE;
+
+ if( ! bInit )
+ {
+ bInit = TRUE;
+ DtIntegrator* pIntegrator = DtIntegrator::CreateDtIntegrator( this );
+ if( pIntegrator )
+ bHaveInfo = pIntegrator->GetSystemLook( aInfo );
+ }
+
+ if( bHaveInfo )
+ {
+ StyleSettings aStyleSettings = rSettings.GetStyleSettings();
+ if( aInfo.windowActiveStart.GetColor() != COL_TRANSPARENT )
+ {
+ aStyleSettings.SetActiveColor( aInfo.windowActiveStart );
+ if( aInfo.windowActiveEnd.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetActiveColor2( aInfo.windowActiveEnd );
+ }
+ if( aInfo.windowInactiveStart.GetColor() != COL_TRANSPARENT )
+ {
+ aStyleSettings.SetDeactiveColor( aInfo.windowInactiveStart );
+ if( aInfo.windowInactiveEnd.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetDeactiveColor2( aInfo.windowInactiveEnd );
+ }
+ if( aInfo.activeBorder.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetActiveBorderColor( aInfo.activeBorder );
+ if( aInfo.inactiveBorder.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetDeactiveBorderColor( aInfo.inactiveBorder );
+ if( aInfo.activeForeground.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetActiveTextColor( aInfo.activeForeground );
+ if( aInfo.inactiveForeground.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetDeactiveTextColor( aInfo.inactiveForeground );
+ if( aInfo.selectForeground.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetHighlightTextColor( aInfo.selectForeground );
+ if( aInfo.selectBackground.GetColor() != COL_TRANSPARENT )
+ aStyleSettings.SetHighlightColor( aInfo.selectBackground );
+ if( aInfo.foreground.GetColor() != COL_TRANSPARENT )
+ {
+ aStyleSettings.SetDialogTextColor( aInfo.foreground );
+ aStyleSettings.SetMenuTextColor( aInfo.foreground );
+ aStyleSettings.SetButtonTextColor( aInfo.foreground );
+ aStyleSettings.SetRadioCheckTextColor( aInfo.foreground );
+ aStyleSettings.SetGroupTextColor( aInfo.foreground );
+ aStyleSettings.SetLabelTextColor( aInfo.foreground );
+ aStyleSettings.SetInfoTextColor( aInfo.foreground );
+ }
+ if( aInfo.background.GetColor() != COL_TRANSPARENT )
+ {
+ aStyleSettings.Set3DColors( aInfo.background );
+ aStyleSettings.SetFaceColor( aInfo.background );
+ aStyleSettings.SetDialogColor( aInfo.background );
+ aStyleSettings.SetMenuColor( aInfo.background );
+ if ( aStyleSettings.GetFaceColor() == COL_LIGHTGRAY )
+ aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) );
+ else
+ {
+ // calculate Checked color
+ Color aColor2 = aStyleSettings.GetLightColor();
+ BYTE nRed = (BYTE)(((USHORT)aInfo.background.GetRed() + (USHORT)aColor2.GetRed())/2);
+ BYTE nGreen = (BYTE)(((USHORT)aInfo.background.GetGreen() + (USHORT)aColor2.GetGreen())/2);
+ BYTE nBlue = (BYTE)(((USHORT)aInfo.background.GetBlue() + (USHORT)aColor2.GetBlue())/2);
+ aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) );
+ }
+ }
+
+ if( aInfo.windowFont.Len() )
+ {
+ Font aWindowFont = aStyleSettings.GetTitleFont();
+ aWindowFont.SetName( aInfo.windowFont );
+ aStyleSettings.SetTitleFont( aWindowFont );
+ }
+
+ rSettings.SetStyleSettings( aStyleSettings );
+ }
+}
+
+// Sound
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::Beep( SoundType eSoundType ) // not fully suported
+{ _GetDisplay()->Beep(); }
+
+// Callback
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+void SalFrame::SetCallback( void* pInst, SALFRAMEPROC pProc )
+{
+ maFrameData.pInst_ = pInst;
+ maFrameData.pProc_ = pProc ? pProc : sal_CallbackDummy;
+}
+
+// Event Handling
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+static USHORT sal_GetCode( int state )
+{
+ USHORT nCode = 0;
+
+ if( state & Button1Mask )
+ nCode |= MOUSE_LEFT;
+ if( state & Button2Mask )
+ nCode |= MOUSE_MIDDLE;
+ if( state & Button3Mask )
+ nCode |= MOUSE_RIGHT;
+
+ if( state & ShiftMask )
+ nCode |= KEY_SHIFT;
+ if( state & ControlMask )
+ nCode |= KEY_MOD1;
+ if( state & Mod1Mask )
+ nCode |= KEY_MOD2;
+
+ return nCode;
+}
+
+long SalFrameData::HandleMouseEvent( XEvent *pEvent )
+{
+ SalMouseEvent aMouseEvt;
+ USHORT nEvent;
+ static ULONG nLines = 0;
+
+ // Solaris X86: clicking the right button on a two-button mouse
+ // generates a button2 event not a button3 event
+ if (pDisplay_->GetProperties() & PROPERTY_SUPPORT_3ButtonMouse )
+ {
+ switch (pEvent->type)
+ {
+ case EnterNotify:
+ case LeaveNotify:
+ if ( pEvent->xcrossing.state & Button2Mask )
+ {
+ pEvent->xcrossing.state &= ~Button2Mask;
+ pEvent->xcrossing.state |= Button3Mask;
+ }
+ break;
+
+ case MotionNotify:
+ if ( pEvent->xmotion.state & Button2Mask )
+ {
+ pEvent->xmotion.state &= ~Button2Mask;
+ pEvent->xmotion.state |= Button3Mask;
+ }
+ break;
+
+ default:
+ if ( Button2 == pEvent->xbutton.button )
+ {
+ pEvent->xbutton.state &= ~Button2Mask;
+ pEvent->xbutton.state |= Button3Mask;
+ pEvent->xbutton.button = Button3;
+ }
+ break;
+ }
+ }
+
+
+ if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type )
+ {
+ aMouseEvt.mnX = pEvent->xcrossing.x;
+ aMouseEvt.mnY = pEvent->xcrossing.y;
+ aMouseEvt.mnTime = pEvent->xcrossing.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xcrossing.state );
+
+ aMouseEvt.mnButton = 0;
+
+ nEvent = LeaveNotify == pEvent->type
+ ? SALEVENT_MOUSELEAVE
+ : SALEVENT_MOUSEMOVE;
+ }
+ else if( pEvent->type == MotionNotify )
+ {
+ aMouseEvt.mnX = pEvent->xmotion.x;
+ aMouseEvt.mnY = pEvent->xmotion.y;
+ aMouseEvt.mnTime = pEvent->xmotion.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xmotion.state );
+
+ aMouseEvt.mnButton = 0;
+
+ nEvent = SALEVENT_MOUSEMOVE;
+ }
+ else
+ {
+ // get input focus on SAL_FRAME_STYLE_CHILD windows
+ // because the focus handling in this case (running as plugin)
+ // is "a little tricky"
+ if( nStyle_ & SAL_FRAME_STYLE_CHILD )
+ XSetInputFocus( GetDisplay()->GetDisplay(), GetWindow(), RevertToParent, CurrentTime );
+ if( pEvent->xbutton.button == Button1 ||
+ pEvent->xbutton.button == Button2 ||
+ pEvent->xbutton.button == Button3 )
+ {
+ aMouseEvt.mnX = pEvent->xbutton.x;
+ aMouseEvt.mnY = pEvent->xbutton.y;
+ aMouseEvt.mnTime = pEvent->xbutton.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
+
+ if( Button1 == pEvent->xbutton.button )
+ aMouseEvt.mnButton = MOUSE_LEFT;
+ else if( Button2 == pEvent->xbutton.button )
+ aMouseEvt.mnButton = MOUSE_MIDDLE;
+ else if( Button3 == pEvent->xbutton.button )
+ aMouseEvt.mnButton = MOUSE_RIGHT;
+
+ nEvent = ButtonPress == pEvent->type
+ ? SALEVENT_MOUSEBUTTONDOWN
+ : SALEVENT_MOUSEBUTTONUP;
+ }
+ else if( pEvent->xbutton.button == Button4 ||
+ pEvent->xbutton.button == Button5 )
+ {
+ if( ! nLines )
+ {
+ char* pEnv = getenv( "SAL_WHEELLINES" );
+ nLines = pEnv ? atoi( pEnv ) : 3;
+ if( nLines > 10 )
+ nLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL;
+ }
+
+ SalWheelMouseEvent aWheelEvt;
+ aWheelEvt.mnTime = pEvent->xbutton.time;
+ aWheelEvt.mnX = pEvent->xbutton.x;
+ aWheelEvt.mnY = pEvent->xbutton.y;
+ aWheelEvt.mnDelta =
+ pEvent->xbutton.button == Button4 ? 120 : -120;
+ aWheelEvt.mnNotchDelta =
+ pEvent->xbutton.button == Button4 ? 1 : -1;
+ aWheelEvt.mnScrollLines = nLines;
+ aWheelEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
+ aWheelEvt.mbHorz = FALSE;
+
+ nEvent = SALEVENT_WHEELMOUSE;
+
+ return Call( nEvent, &aWheelEvt );
+ }
+ }
+
+ if( nEvent == SALEVENT_MOUSELEAVE
+ || ( aMouseEvt.mnX < nWidth_ && aMouseEvt.mnX > -1 &&
+ aMouseEvt.mnY < nHeight_ && aMouseEvt.mnY > -1 )
+ || pDisplay_->MouseCaptured( this ) )
+ return Call( nEvent, &aMouseEvt );
+
+#ifdef DBG_UTIL
+ fprintf( stderr, "SalFrameData::HandleMouseEvent %d size=%d*%d event=%d.%d\n",
+ pEvent->type, nWidth_, nHeight_, aMouseEvt.mnX, aMouseEvt.mnY );
+#endif
+ return 0;
+}
+
+
+// F10 means either KEY_F10 or KEY_MENU, which has to be decided
+// in the independent part.
+struct KeyAlternate
+{
+ USHORT nKeyCode;
+ sal_Unicode nCharCode;
+ KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
+ KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
+};
+
+inline KeyAlternate
+GetAlternateKeyCode( const USHORT nKeyCode )
+{
+ KeyAlternate aAlternate;
+
+ switch( nKeyCode )
+ {
+ case KEY_F10: aAlternate = KeyAlternate( KEY_MENU );break;
+ case KEY_F24: aAlternate = KeyAlternate( KEY_SUBTRACT, '-' );break;
+ }
+
+ return aAlternate;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleKeyEvent( XKeyEvent *pEvent )
+{
+ int nLen = 16;
+ unsigned char *pPrintable = (unsigned char*)alloca( nLen );
+ KeySym nKeySym;
+
+ // if we haven't got an input context yet then it's time to build it
+ if ( mpInputContext == NULL )
+ {
+ mpInputContext = new SalI18N_InputContext( pFrame_ );
+ if ( mpInputContext->UseContext() )
+ mpInputContext->ExtendEventMask( XtWindow( hShell_ ) );
+ }
+ // singlebyte code composed by input method, the new default
+ if ( mpInputContext->UseContext() )
+ {
+ Status nStatus;
+ nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen,
+ &nStatus, mpInputContext->GetContext() );
+ if ( nStatus == XBufferOverflow )
+ {
+ nLen += 1;
+ pPrintable = (unsigned char*)alloca( nLen );
+ nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen,
+ &nStatus, mpInputContext->GetContext() );
+ }
+ }
+ else
+ {
+ // fallback, this should never ever be called
+ Status nStatus = 0;
+ nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, &nStatus );
+ if( !nLen )
+ pPrintable[0] = 0;
+ }
+
+ USHORT nModCode = 0;
+ if( pEvent->state & ShiftMask )
+ nModCode |= KEY_SHIFT;
+ if( pEvent->state & ControlMask )
+ nModCode |= KEY_MOD1;
+ if( pEvent->state & Mod1Mask )
+ {
+ nModCode |= KEY_MOD2;
+ if ( !(nModCode & KEY_MOD1) )
+ nModCode |= KEY_CONTROLMOD;
+ }
+
+ if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R
+ || nKeySym == XK_Control_L || nKeySym == XK_Control_R
+ || nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
+ || nKeySym == XK_Meta_L || nKeySym == XK_Meta_R )
+ {
+ SalKeyModEvent aModEvt;
+
+ // pressing just the ctrl key leads to a keysym of XK_Control but
+ // the event state does not contain ControlMask. In the release
+ // event its the other way round: it does contain the Control mask.
+ // The modifier mode therefor has to be adapted manually.
+ if (pEvent->type == KeyRelease)
+ {
+ if ( (nKeySym == XK_Control_L) || (nKeySym == XK_Control_R) )
+ nModCode &= ~KEY_MOD1;
+ if ( (nKeySym == XK_Shift_L) || (nKeySym == XK_Shift_R) )
+ nModCode &= ~KEY_SHIFT;
+ if ( (nKeySym == XK_Alt_L) || (nKeySym == XK_Alt_R) )
+ nModCode &= ~KEY_MOD2;
+ }
+ else
+ {
+ if ( (nKeySym == XK_Control_L) || (nKeySym == XK_Control_R) )
+ nModCode |= KEY_MOD1;
+ if ( (nKeySym == XK_Shift_L) || (nKeySym == XK_Shift_R) )
+ nModCode |= KEY_SHIFT;
+ if ( (nKeySym == XK_Alt_L) || (nKeySym == XK_Alt_R) )
+ nModCode |= KEY_MOD2;
+ }
+
+ aModEvt.mnCode = nModCode;
+ aModEvt.mnTime = pEvent->time;
+
+ return Call( SALEVENT_KEYMODCHANGE, &aModEvt );
+ }
+
+ SalKeyEvent aKeyEvt;
+ USHORT nKeyCode;
+
+ nKeyCode = pDisplay_->GetKeyCode( nKeySym, (char*)pPrintable );
+ if( !nKeyCode && !pPrintable[0] )
+ return 0;
+
+ rtl_TextEncoding nEncoding = gsl_getSystemTextEncoding();
+ sal_Unicode *pBuffer;
+ sal_Size nSize;
+ if ( nEncoding != RTL_TEXTENCODING_UNICODE )
+ {
+ // create text converter
+ rtl_TextToUnicodeConverter aConverter =
+ rtl_createTextToUnicodeConverter( nEncoding );
+ rtl_TextToUnicodeContext aContext =
+ rtl_createTextToUnicodeContext( aConverter );
+
+ sal_Size nBufferSize = nLen * 2;
+ sal_uInt32 nConversionInfo;
+ sal_Size nConvertedChars;
+
+ pBuffer = (sal_Unicode*) alloca( nBufferSize + 1);
+
+ // convert to single byte text stream
+ nSize = rtl_convertTextToUnicode(
+ aConverter, aContext,
+ (char*)pPrintable, nLen,
+ pBuffer, nBufferSize,
+ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE,
+ &nConversionInfo, &nConvertedChars );
+
+ // destroy converter
+ rtl_destroyTextToUnicodeContext( aConverter, aContext );
+ rtl_destroyTextToUnicodeConverter( aConverter );
+ }
+ else
+ {
+ pBuffer = (sal_Unicode*)pPrintable;
+ nSize = nLen;
+ }
+
+ // XXX it shouldn't be possible to create a keyrelease event with
+ // more than a single character in the event, but check it anyway
+ // as well it shouldn't be possible to generate more than a single
+ // char without an input method
+ if ( nSize > 1
+ && mpInputContext->UseContext()
+ && KeyRelease != pEvent->type )
+ {
+ mpInputContext->CommitStringCallback( pBuffer, nSize );
+ }
+ else
+ {
+ aKeyEvt.mnCode = nKeyCode | nModCode;
+ aKeyEvt.mnRepeat = 0;
+ aKeyEvt.mnTime = pEvent->time;
+ aKeyEvt.mnCharCode = pBuffer[ 0 ];
+
+ if( KeyRelease == pEvent->type )
+ {
+ Call( SALEVENT_KEYUP, &aKeyEvt );
+ }
+ else
+ {
+ if ( ! Call(SALEVENT_KEYINPUT, &aKeyEvt) )
+ {
+ // independent layer doesnt want to handle key-event, so check
+ // whether the keycode may have an alternate meaning
+ KeyAlternate aAlternate = GetAlternateKeyCode( nKeyCode );
+ if ( aAlternate.nKeyCode != 0 )
+ {
+ aKeyEvt.mnCode = aAlternate.nKeyCode | nModCode;
+ if( aAlternate.nCharCode )
+ aKeyEvt.mnCharCode = aAlternate.nCharCode;
+ Call(SALEVENT_KEYINPUT, &aKeyEvt);
+ }
+ }
+ }
+ }
+
+ return True;
+}
+
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleFocusEvent( XFocusChangeEvent *pEvent )
+{
+ /* #55691# ignore focusout resulting from keyboard grabs
+ * we do not grab it and are not interested when
+ * someone else does CDE e.g. does a XGrabKey on arrow keys
+ * #73179# handle focus events with mode NotifyWhileGrabbed
+ * because with CDE alt-tab focus changing we do not get
+ * normal focus events
+ * #71791# cast focus event to the input context, otherwise the
+ * status window does not follow the application frame
+ */
+ if ( mpInputContext != NULL )
+ {
+ if( FocusIn == pEvent->type )
+ mpInputContext->SetICFocus();
+ else
+ mpInputContext->UnsetICFocus();
+ }
+
+ if ( pEvent->mode == NotifyNormal || pEvent->mode == NotifyWhileGrabbed )
+ {
+ if( FocusIn == pEvent->type )
+ {
+ return Call( SALEVENT_GETFOCUS, 0 );
+ }
+ else
+ {
+ return Call( SALEVENT_LOSEFOCUS, 0 );
+ }
+ }
+
+ return 0;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+class SalPeekExpose
+{
+ XEvent aEvent_;
+ XEvent *pEvent_;
+ USHORT nEvent_;
+
+public:
+ inline Bool Callback()
+ {
+ if( aEvent_.type != pEvent_->type
+ || aEvent_.xany.window != pEvent_->xany.window )
+ return !--nEvent_;
+ pEvent_->xexpose.count++;
+ return True;
+ }
+ inline SalPeekExpose( XEvent *p );
+};
+
+extern "C" Bool
+sal_PeekExpose( Display*, XEvent*, char *p )
+{
+ return ((SalPeekExpose*)p)->Callback();
+}
+
+inline SalPeekExpose::SalPeekExpose( XEvent *p ) : pEvent_( p )
+{
+#ifdef DBG_UTIL
+ memset( &aEvent_, 0, sizeof( aEvent_ ) );
+#endif
+ nEvent_ = QLength( p->xany.display );
+ XPeekIfEvent( p->xany.display, &aEvent_, sal_PeekExpose, (char*)this );
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleExposeEvent( XEvent *pEvent )
+{
+ XRectangle aRect;
+ USHORT nCount;
+
+ if( pEvent->type == Expose )
+ {
+ aRect.x = pEvent->xexpose.x;
+ aRect.y = pEvent->xexpose.y;
+ aRect.width = pEvent->xexpose.width;
+ aRect.height = pEvent->xexpose.height;
+ nCount = pEvent->xexpose.count;
+ }
+ else if( pEvent->type == GraphicsExpose )
+ {
+ aRect.x = pEvent->xgraphicsexpose.x;
+ aRect.y = pEvent->xgraphicsexpose.y;
+ aRect.width = pEvent->xgraphicsexpose.width;
+ aRect.height = pEvent->xgraphicsexpose.height;
+ nCount = pEvent->xgraphicsexpose.count;
+ }
+
+ if( hNoFullscreenShell_ != None )
+ // we are in fullscreen mode -> override redirect
+ // focus is probably lost, so reget it
+ XSetInputFocus( GetXDisplay(), XtWindow( hShell_ ), RevertToNone, CurrentTime );
+
+ if( !IsWaitingForExpose() )
+ {
+ // complete painting
+ if( !nCount
+ && !aRect.x
+ && !aRect.y
+ && aRect.width == nWidth_
+ && aRect.height == nHeight_ )
+ {
+ SalPaintEvent aPEvt;
+
+ aPEvt.mnBoundX = 0;
+ aPEvt.mnBoundY = 0;
+ aPEvt.mnBoundWidth = nWidth_;
+ aPEvt.mnBoundHeight = nHeight_;
+
+ Call( SALEVENT_PAINT, &aPEvt );
+
+ return 1;
+ }
+
+ pPaintRegion_ = XCreateRegion();
+ }
+
+ XUnionRectWithRegion( &aRect, pPaintRegion_, pPaintRegion_ );
+
+ if( nCount ) // wait for last expose rectangle
+ return 1;
+
+ if( QLength( pEvent->xany.display ) )
+ {
+ SalPeekExpose Peek( pEvent );
+
+ if( pEvent->xexpose.count )
+ {
+ stderr1( "SalFrameData::HandleExposeEvent %s\n",
+ ServerVendor(GetXDisplay()) );
+ return 1;
+ }
+ }
+
+ SalPaintEvent aPEvt;
+
+ XClipBox( pPaintRegion_, &aRect );
+
+ aPEvt.mnBoundX = aRect.x;
+ aPEvt.mnBoundY = aRect.y;
+ aPEvt.mnBoundWidth = aRect.width;
+ aPEvt.mnBoundHeight = aRect.height;
+
+ Call( SALEVENT_PAINT, &aPEvt );
+
+ XDestroyRegion( pPaintRegion_ );
+ pPaintRegion_ = NULL;
+
+ return 1;
+}
+
+void SalFrameData::RepositionFloatChildren()
+{
+ // move SAL_FRAME_STYLE_FLOAT children to new position
+ for( int nChild = 0; nChild < maChildren.Count(); nChild++ )
+ {
+ SalFrameData* pData = &maChildren.GetObject( nChild )->maFrameData;
+ if( pData->nStyle_ & SAL_FRAME_STYLE_FLOAT )
+ {
+#ifdef DEBUG
+ fprintf( stderr, "moving FLOAT child\n" );
+#endif
+ pData->SetPosSize( pData->aPosSize_ );
+ }
+ }
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleSizeEvent( XConfigureEvent *pEvent )
+{
+ if ( pEvent->window != XtWindow( hShell_ )
+ && pEvent->window != XtWindow( hComposite_ )
+ && pEvent->window != hForeignParent_
+ && pEvent->window != hForeignTopLevelWindow_ )
+ {
+ // could be as well a sys-child window (aka SalObject)
+ return 1;
+ }
+
+ // ignore for now
+ if( nStyle_ & SAL_FRAME_STYLE_FLOAT )
+ return 1;
+
+ if( pEvent->window == hForeignTopLevelWindow_ )
+ {
+ // just update the children's positions
+ RepositionFloatChildren();
+ return 1;
+ }
+
+ if( pEvent->window == hForeignParent_ )
+ {
+ Arg args[10];
+ int n = 0;
+ XtSetArg(args[n], XtNheight, pEvent->height); n++;
+ XtSetArg(args[n], XtNwidth, pEvent->width); n++;
+ XtSetValues( hShell_, args, n );
+ }
+ if( SHOWSTATE_UNKNOWN == nShowState_ )
+ {
+ nShowState_ = SHOWSTATE_NORMAL;
+
+ XSizeHints hints;
+ long supplied;
+ if( XGetWMNormalHints( pEvent->display,
+ pEvent->window,
+ &hints,
+ &supplied ) )
+ {
+ if( hints.flags & PMaxSize ) // supplied
+ {
+ nMaxWidth_ = hints.max_width;
+ nMaxHeight_ = hints.max_height;
+ DBG_ASSERT( nMaxWidth_ && nMaxHeight_, "!MaxWidth^!MaxHeight" )
+ }
+ }
+ }
+
+ if( !pEvent->send_event )
+ {
+ XLIB_Window hDummy;
+ XTranslateCoordinates( GetXDisplay(),
+ XtWindow( hShell_ ),
+ pDisplay_->GetRootWindow(),
+ 0, 0,
+ &pEvent->x, &pEvent->y,
+ &hDummy );
+ }
+
+ if( nMaxWidth_ || nMaxHeight_ )
+ {
+ if( nMaxWidth_ != pEvent->width || nMaxHeight_ != pEvent->height )
+ aRestoreMaximize_ = Rectangle();
+ else if( aRestoreMaximize_.IsEmpty() )
+ {
+ stderr0( "SalFrameData::HandleSizeEvent zoomed\n" );
+ GetPosSize( aRestoreMaximize_ );
+ }
+ }
+ else
+ if( pEvent->x != nLeft_ || pEvent->y != nTop_ )
+ aRestoreMaximize_ = Rectangle();
+ else
+ {
+ Size aSize( pEvent->width + nLeft_ + nRight_,
+ pEvent->height + nTop_ + nBottom_ );
+
+ if( aSize != pDisplay_->GetScreenSize() )
+ aRestoreMaximize_ = Rectangle();
+ else
+ if( aRestoreMaximize_.IsEmpty() )
+ {
+ stderr0( "SalFrameData::HandleSizeEvent zoomed\n" );
+ GetPosSize( aRestoreMaximize_ );
+ }
+ }
+
+ aPosSize_.Left() = pEvent->x;
+ aPosSize_.Top() = pEvent->y;
+ aPosSize_.Right() = aPosSize_.Left() + pEvent->width - 1;
+ aPosSize_.Bottom() = aPosSize_.Top() + pEvent->height - 1;
+
+ // update children's position
+ RepositionFloatChildren();
+
+ if( nWidth_ != pEvent->width || nHeight_ != pEvent->height )
+ {
+ nWidth_ = pEvent->width;
+ nHeight_ = pEvent->height;
+
+ if( pEvent->window != XtWindow( hComposite_ ) )
+ {
+ XtResizeWidget(hComposite_, nWidth_, nHeight_, 0);
+
+ Arg args[4];
+ int n = 0;
+ XtSetArg(args[n], XtNheight, pEvent->height); n++;
+ XtSetArg(args[n], XtNwidth, pEvent->width); n++;
+ // XtSetValues(hComposite_, args, n);
+ }
+ Call( SALEVENT_RESIZE, NULL );
+ }
+ return 1;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleReparentEvent( XReparentEvent *pEvent )
+{
+ Display *pDisplay = pEvent->display;
+ XLIB_Window hWM_Parent = pEvent->parent;
+ XLIB_Window hRoot, *Children, hDummy;
+ unsigned int nChildren, n;
+ BOOL bNone = pDisplay_->GetProperties()
+ & PROPERTY_SUPPORT_WM_Parent_Pixmap_None;
+
+ if( hWM_Parent == pDisplay_->GetRootWindow()
+ || hWM_Parent == hForeignParent_
+ || ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) )
+ {
+ // Reparenting before Destroy
+ return 0;
+ }
+
+ if( !pEvent->x && !pEvent->y )
+ {
+ if( bNone )
+ XSetWindowBackgroundPixmap( pDisplay, hWM_Parent, None );
+
+ XQueryTree( GetXDisplay(),
+ hWM_Parent,
+ &hRoot,
+ &hWM_Parent,
+ &Children,
+ &nChildren );
+
+ XFree( Children );
+ }
+
+ if( hWM_Parent == hRoot )
+ hWM_Parent = pEvent->parent;
+ else if( bNone )
+ XSetWindowBackgroundPixmap( pDisplay, hWM_Parent, None );
+
+ XQueryTree( pDisplay,
+ hWM_Parent,
+ &hRoot,
+ &hDummy,
+ &Children,
+ &nChildren );
+
+#ifdef DBG_UTIL
+ if( hDummy != hRoot )
+ {
+ fprintf( stderr,
+ "SalFrameData::HandleReparentEvent hDummy!=hRoot"
+ " r=%ld d=%ld p=%ld n=%d\n",
+ hRoot, hDummy, hWM_Parent, nChildren );
+ pDisplay_->PrintEvent( "HandleReparentEvent", (XEvent*)pEvent );
+ }
+#endif
+#ifdef NC_EVENTS
+ for( n = 0; n < nChildren; n++ )
+ if( Children[n] != hShell_ && Children[n] != pEvent->parent )
+ XSelectInput( pDisplay, Children[n], NC_EVENTS );
+#endif
+ XFree( Children );
+ if( !XTranslateCoordinates( GetXDisplay(),
+ XtWindow( hShell_ ),
+ hWM_Parent,
+ 0, 0,
+ &nLeft_, &nTop_,
+ &hDummy ) )
+ {
+ fprintf( stderr, "SalFramaData::HandleReparentEvent !XTranslateCoordinates\n" );
+ abort();
+ }
+
+ nRight_ = nLeft_; // ???
+ nBottom_ = nLeft_; // ???
+
+ // hack: maximize if vendor is XFREE (why? MB!), only remote client
+
+ if( (aPosSize_.IsEmpty() || WindowNeedGoodPosition( XtWindow( hShell_ ) ) )
+ && pDisplay_->GetProperties() & PROPERTY_FEATURE_Maximize )
+ {
+ nShowState_ = SHOWSTATE_NORMAL;
+ Maximize();
+ aRestoreMaximize_ = Rectangle(); // not a real maximize
+ }
+ else
+ {
+ // limit width and height if we are too large: #47757
+ // olwm and fvwm need this, it doesnt harm the rest
+
+ int nScreenWidth = pDisplay_->GetScreenSize().Width();
+ int nScreenHeight = pDisplay_->GetScreenSize().Height();
+ int nFrameWidth = aPosSize_.GetWidth() + nLeft_ + nRight_;
+ int nFrameHeight = aPosSize_.GetHeight() + nTop_ + nBottom_;
+
+ if ((nFrameWidth > nScreenWidth) || (nFrameHeight > nScreenHeight))
+ {
+ Size aSize(aPosSize_.GetWidth(), aPosSize_.GetHeight());
+
+ if (nFrameWidth > nScreenWidth)
+ aSize.Width() = nScreenWidth - nRight_ - nLeft_;
+ if (nFrameHeight > nScreenHeight)
+ aSize.Height() = nScreenHeight - nBottom_ - nTop_;
+
+ SetSize (aSize);
+ }
+ }
+
+
+ return 1;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+alpha long SalFrameData::HandleColormapEvent( XColormapEvent *pEvent )
+{
+ return 0;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleStateEvent( XPropertyEvent *pEvent )
+{
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems, bytes_after;
+ unsigned char *prop = NULL;
+
+ if( 0 != XGetWindowProperty( GetXDisplay(),
+ XtWindow( hShell_ ),
+ pEvent->atom, // property
+ 0, // long_offset (32bit)
+ 2, // long_length (32bit)
+ False, // delete
+ pEvent->atom, // req_type
+ &actual_type,
+ &actual_format,
+ &nitems,
+ &bytes_after,
+ &prop )
+ || ! prop
+ )
+ return 0;
+
+ DBG_ASSERT( actual_type = pEvent->atom
+ && 32 == actual_format
+ && 2 == nitems
+ && 0 == bytes_after, "HandleStateEvent" )
+
+ if( *(unsigned long*)prop == NormalState )
+ nShowState_ = SHOWSTATE_NORMAL;
+ else if( *(unsigned long*)prop == IconicState )
+ nShowState_ = SHOWSTATE_MINIMIZED;
+
+ XFree( prop );
+ return 1;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+long SalFrameData::HandleClientMessage( XClientMessageEvent *pEvent )
+{
+ SalICCCM &rICCCM = pDisplay_->GetICCCM();
+
+ if( rICCCM.IsUserEvent( pEvent->message_type ) )
+ {
+#if __SIZEOFLONG > 4
+ void* pData = (void*)
+ ( (pEvent->data.l[0] & 0xffffffff) | (pEvent->data.l[1] << 32) );
+#else
+ void* pData = (void*)(pEvent->data.l[0]);
+#endif
+ Call( SALEVENT_USEREVENT, pData );
+ return 1;
+ }
+ else if( rICCCM.IsQuitEvent( pEvent->message_type ) )
+ {
+ stderr0( "SalFrameData::Dispatch Quit\n" );
+ Close(); // ???
+ return 1;
+ }
+ else if( rICCCM.IsWM_Protocols( pEvent->message_type ) )
+ {
+ if( rICCCM.IsWM_DeleteWindow( pEvent->data.l[0] ) )
+ {
+ stderr0( "SalFrameData::Dispatch DeleteWindow\n" );
+ Close();
+ return 1;
+ }
+ else if( rICCCM.IsWM_SaveYourself( pEvent->data.l[0] ) )
+ {
+ SalFrame* pLast = GetSalData()->pFirstFrame_;
+ while( pLast->maFrameData.pNextFrame_ )
+ pLast = pLast->maFrameData.pNextFrame_;
+ if( pLast == pFrame_ )
+ {
+ ByteString aExec( SessionManagerClient::getExecName(), gsl_getSystemTextEncoding() );
+ char* argv[2];
+ argv[0] = "/bin/sh";
+ argv[1] = const_cast<char*>(aExec.GetBuffer());
+ XSetCommand( GetXDisplay(), XtWindow( hShell_ ), argv, 2 );
+ }
+ else
+ XDeleteProperty( GetXDisplay(), XtWindow( hShell_ ), rICCCM.aWM_Command_ );
+ }
+ }
+ return 0;
+}
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+Bool SalFrameData::checkKeyReleaseForRepeat( Display* pDisplay, XEvent* pCheck, XPointer pSalFrameData )
+{
+ SalFrameData* pThis = (SalFrameData*)pSalFrameData;
+ return
+ pCheck->type == XLIB_KeyPress &&
+ pCheck->xkey.state == pThis->nKeyState_ &&
+ pCheck->xkey.keycode == pThis->nKeyCode_ &&
+ pCheck->xkey.time == pThis->nReleaseTime_ ? True : False;
+}
+
+long SalFrameData::Dispatch( XEvent *pEvent )
+{
+ long nRet = 0;
+
+ if( -1 == nCaptured_ )
+ {
+ CaptureMouse( TRUE );
+#ifdef DBG_UTIL
+ if( -1 != nCaptured_ )
+ pDisplay_->PrintEvent( "Captured", pEvent );
+#endif
+ }
+
+ if( pEvent->xany.window == XtWindow( hShell_ ) || pEvent->xany.window == XtWindow( hComposite_ ) )
+ {
+ switch( pEvent->type )
+ {
+ case XLIB_KeyPress:
+ nKeyCode_ = pEvent->xkey.keycode;
+ nKeyState_ = pEvent->xkey.state;
+ nRet = HandleKeyEvent( &pEvent->xkey );
+ break;
+
+ case KeyRelease:
+ if( -1 == nCompose_ )
+ {
+ nReleaseTime_ = pEvent->xkey.time;
+ XEvent aEvent;
+ if( XCheckIfEvent( pEvent->xkey.display, &aEvent, checkKeyReleaseForRepeat, (XPointer)this ) )
+ XPutBackEvent( pEvent->xkey.display, &aEvent );
+ else
+ nRet = HandleKeyEvent( &pEvent->xkey );
+ }
+ break;
+
+ case ButtonPress:
+ // #74406# if we loose the focus in presentation mode
+ // there are good chances that we never get it back
+ // since the WM ignores us
+ if( hNoFullscreenShell_ != None )
+ {
+ XSetInputFocus( GetXDisplay(), GetShellWindow(),
+ RevertToNone, CurrentTime );
+ }
+
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ nRet = HandleMouseEvent( pEvent );
+ break;
+
+ case FocusIn:
+ case FocusOut:
+ nRet = HandleFocusEvent( &pEvent->xfocus );
+ break;
+
+ case Expose:
+ case GraphicsExpose:
+ nRet = HandleExposeEvent( pEvent );
+ break;
+
+ case MapNotify:
+ if( pEvent->xmap.window == XtWindow( hShell_ ) ||
+ pEvent->xmap.window == XtWindow( hComposite_ ) )
+ {
+ bMapped_ = TRUE;
+ bViewable_ = TRUE;
+ nRet = TRUE;
+ if ( mpInputContext != NULL )
+ mpInputContext->Map( pFrame_ );
+ Call( SALEVENT_RESIZE, NULL );
+ }
+ break;
+
+ case UnmapNotify:
+ if( pEvent->xunmap.window == XtWindow( hShell_ ) )
+ {
+ bMapped_ = FALSE;
+ bViewable_ = FALSE;
+ nRet = TRUE;
+ if ( mpInputContext != NULL )
+ mpInputContext->Unmap();
+ Call( SALEVENT_RESIZE, NULL );
+ }
+ break;
+
+ case ConfigureNotify:
+ if( pEvent->xconfigure.window == XtWindow( hShell_ ) ||
+ pEvent->xconfigure.window == XtWindow( hComposite_ ) )
+ nRet = HandleSizeEvent( &pEvent->xconfigure );
+ break;
+
+ case VisibilityNotify:
+ nVisibility_ = pEvent->xvisibility.state;
+ nRet = TRUE;
+ break;
+
+ case ReparentNotify:
+ nRet = HandleReparentEvent( &pEvent->xreparent );
+ break;
+
+ case MappingNotify:
+ if( MappingPointer != pEvent->xmapping.request )
+ nRet = Call( SALEVENT_KEYBOARDCHANGED, 0 );
+ break;
+
+ case ColormapNotify:
+ nRet = HandleColormapEvent( &pEvent->xcolormap );
+ break;
+
+ case PropertyNotify:
+ {
+ SalICCCM &rICCCM = pDisplay_->GetICCCM();
+
+ if( rICCCM.IsWM_State( pEvent->xproperty.atom ) )
+ nRet = HandleStateEvent( &pEvent->xproperty );
+ else
+ nRet = 1;
+ break;
+ }
+
+ case ClientMessage:
+ nRet = HandleClientMessage( &pEvent->xclient );
+ break;
+ }
+ }
+ else
+ {
+ switch( pEvent->type )
+ {
+#ifdef NC_EVENTS
+ case XLIB_KeyPress:
+ case KeyRelease:
+ nRet = HandleNCKeyEvent()
+ break;
+
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ nRet = HandleNCMouseEvent( pEvent );
+ break;
+
+ case Expose:
+ nRet = HandleNCExposeEvent( pEvent );
+ break;
+#endif
+ case ConfigureNotify:
+ if( pEvent->xconfigure.window == hForeignParent_ ||
+ pEvent->xconfigure.window == hForeignTopLevelWindow_ )
+ nRet = HandleSizeEvent( &pEvent->xconfigure );
+ break;
+ }
+ }
+
+ // #74406# do not raise fullscreenwindow as it may override the
+ // screenlocker
+#if 0
+ if( bAlwaysOnTop_
+ && nVisibility_ != VisibilityUnobscured
+ && pEvent->type != ConfigureNotify
+ && pEvent->type != MotionNotify )
+ {
+ XRaiseWindow( GetXDisplay(), XtWindow( hShell_ ) );
+ }
+#endif
+
+
+ return nRet;
+}
+
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
new file mode 100644
index 000000000000..56d2383d8928
--- /dev/null
+++ b/vcl/unx/source/window/salobj.cxx
@@ -0,0 +1,447 @@
+/*************************************************************************
+ *
+ * $RCSfile: salobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:48 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SV_SALOBJ_CXX
+
+#include <prex.h>
+#include <X11/Xlib.h>
+#include <X11/extensions/shape.h>
+#ifdef USE_MOTIF
+#include <Xm/DrawingA.h>
+#else
+#include <X11/Xaw/Label.h>
+#endif
+#include <postx.h>
+
+#include <salunx.h>
+#include <salstd.hxx>
+
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
+#endif
+#ifndef _SV_SALINST_HXX
+#include <salinst.hxx>
+#endif
+#ifndef _SV_SALDISP_HXX
+#include <saldisp.hxx>
+#endif
+#ifndef _SV_SALFRAME_HXX
+#include <salframe.hxx>
+#endif
+#ifndef _SV_SALOBJ_HXX
+#include <salobj.hxx>
+#endif
+
+#ifdef USE_MOTIF
+#define OBJECT_WIDGET_CLASS xmDrawingAreaWidgetClass
+#else
+#define OBJECT_WIDGET_CLASS labelWidgetClass
+#endif
+
+SalObjectList SalObjectData::aAllObjects;
+
+// =======================================================================
+
+long ImplSalObjCallbackDummy( void*, SalObject*, USHORT, const void* )
+{
+ return 0;
+}
+
+// =======================================================================
+// SalInstance memberfkts to create and destroy a SalObject
+
+SalObject* SalInstance::CreateObject( SalFrame* pParent )
+{
+ int error_base, event_base;
+ SalObject* pObject = new SalObject;
+ SystemChildData* pObjData = const_cast<SystemChildData*>(pObject->GetSystemData());
+
+ if ( ! XShapeQueryExtension( (Display*)pObjData->pDisplay,
+ &event_base, &error_base ) )
+ {
+ delete pObject;
+ return NULL;
+ }
+
+ SalDisplay* pSalDisp = pParent->maFrameData.GetDisplay();
+ Widget pWidgetParent = pParent->maFrameData.GetWidget();
+
+ pObject->maObjectData.maPrimary =
+ XtVaCreateManagedWidget( "salobject primary",
+ OBJECT_WIDGET_CLASS,
+ pWidgetParent,
+ NULL );
+ pObject->maObjectData.maSecondary =
+ XtVaCreateManagedWidget( "salobject secondary",
+ OBJECT_WIDGET_CLASS,
+ pObject->maObjectData.maPrimary,
+ NULL );
+ XtRealizeWidget( pObject->maObjectData.maPrimary );
+ XtRealizeWidget( pObject->maObjectData.maSecondary );
+
+ pObjData->pDisplay = XtDisplay( pObject->maObjectData.maPrimary );
+ pObjData->aWindow = XtWindow( pObject->maObjectData.maSecondary );
+ pObjData->pWidget = pObject->maObjectData.maSecondary;
+ pObjData->pVisual = pSalDisp->GetVisual()->GetVisual();
+ pObjData->nDepth = pSalDisp->GetVisual()->GetDepth();
+ pObjData->aColormap = pSalDisp->GetColormap().GetXColormap();
+ pObjData->pAppContext = pSalDisp->GetXLib()->GetAppContext();
+ return pObject;
+}
+
+
+void SalInstance::DestroyObject( SalObject* pObject )
+{
+ delete pObject;
+}
+
+
+// ======================================================================
+// SalClipRegion is a member of SalObject
+// definition of SalClipRegion my be found in unx/inc/salobj.h
+
+
+SalClipRegion::SalClipRegion()
+{
+ ClipRectangleList = NULL;
+ numClipRectangles = 0;
+ maxClipRectangles = 0;
+ nClipRegionType = SAL_OBJECT_CLIP_INCLUDERECTS;
+}
+
+
+SalClipRegion::~SalClipRegion()
+{
+ if ( ClipRectangleList )
+ delete ClipRectangleList;
+}
+
+
+void
+SalClipRegion::BeginSetClipRegion( ULONG nRects )
+{
+ if (ClipRectangleList)
+ delete ClipRectangleList;
+
+ ClipRectangleList = new XRectangle[nRects];
+ numClipRectangles = 0;
+ maxClipRectangles = nRects;
+}
+
+
+void
+SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+{
+ if ( nWidth && nHeight && (numClipRectangles < maxClipRectangles) )
+ {
+ XRectangle *aRect = ClipRectangleList + numClipRectangles;
+
+ aRect->x = (short) nX;
+ aRect->y = (short) nY;
+ aRect->width = (unsigned short) nWidth;
+ aRect->height= (unsigned short) nHeight;
+
+ numClipRectangles++;
+ }
+}
+
+
+// =======================================================================
+// SalObject Implementation
+
+
+SalObject::SalObject()
+{
+ maObjectData.maSystemChildData.nSize = sizeof( SystemChildData );
+ maObjectData.maSystemChildData.pDisplay = GetSalData()->GetDefDisp()->GetDisplay();
+ maObjectData.maSystemChildData.aWindow = None;
+ maObjectData.maSystemChildData.pSalFrame = 0;
+ maObjectData.maSystemChildData.pWidget = 0;
+ maObjectData.maSystemChildData.pVisual = 0;
+ maObjectData.maSystemChildData.nDepth = 0;
+ maObjectData.maSystemChildData.aColormap = 0;
+
+ maObjectData.mpInst = NULL;
+ maObjectData.mpProc = ImplSalObjCallbackDummy;
+ maObjectData.maPrimary = NULL;
+ maObjectData.maSecondary = NULL;
+
+ SalObjectData::aAllObjects.Insert( this, LIST_APPEND );
+}
+
+
+SalObject::~SalObject()
+{
+ SalObjectData::aAllObjects.Remove( this );
+ if ( maObjectData.maPrimary )
+ XtDestroyWidget ( maObjectData.maPrimary );
+ if ( maObjectData.maSecondary )
+ XtDestroyWidget ( maObjectData.maSecondary );
+}
+
+
+void
+SalObject::ResetClipRegion()
+{
+ maObjectData.maClipRegion.ResetClipRegion();
+
+ const int dest_kind = ShapeBounding;
+ const int op = ShapeSet;
+ const int ordering = YSorted;
+
+ XWindowAttributes win_attrib;
+ XRectangle win_size;
+
+ XGetWindowAttributes ( (Display*)maObjectData.maSystemChildData.pDisplay,
+ maObjectData.maSystemChildData.aWindow,
+ &win_attrib );
+
+ win_size.x = 0;
+ win_size.y = 0;
+ win_size.width = win_attrib.width;
+ win_size.height = win_attrib.width;
+
+ XShapeCombineRectangles ( (Display*)maObjectData.maSystemChildData.pDisplay,
+ maObjectData.maSystemChildData.aWindow,
+ dest_kind,
+ 0, 0, // x_off, y_off
+ &win_size, // list of rectangles
+ 1, // number of rectangles
+ op, ordering );
+}
+
+
+void
+SalObject::BeginSetClipRegion( ULONG nRectCount )
+{
+ maObjectData.maClipRegion.BeginSetClipRegion ( nRectCount );
+}
+
+
+void
+SalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+{
+ maObjectData.maClipRegion.UnionClipRegion ( nX, nY, nWidth, nHeight );
+}
+
+
+void
+SalObject::EndSetClipRegion()
+{
+ XRectangle *pRectangles = maObjectData.maClipRegion.EndSetClipRegion ();
+ const int nType = maObjectData.maClipRegion.GetClipRegionType();
+ const int nRectangles = maObjectData.maClipRegion.GetRectangleCount();
+
+ const int dest_kind = ShapeBounding;
+ const int ordering = YSorted;
+ int op;
+
+ switch ( nType )
+ {
+ case SAL_OBJECT_CLIP_INCLUDERECTS :
+ op = ShapeSet;
+ break;
+ case SAL_OBJECT_CLIP_EXCLUDERECTS :
+ op = ShapeSubtract;
+ break;
+ case SAL_OBJECT_CLIP_ABSOLUTE :
+ op = ShapeSet;
+ break;
+ default :
+ op = ShapeUnion;
+ }
+
+ XShapeCombineRectangles ( (Display*)maObjectData.maSystemChildData.pDisplay,
+ maObjectData.maSystemChildData.aWindow,
+ dest_kind,
+ 0, 0, // x_off, y_off
+ pRectangles,
+ nRectangles,
+ op, ordering );
+}
+
+
+USHORT
+SalObject::GetClipRegionType()
+{
+ return maObjectData.maClipRegion.GetClipRegionType();
+}
+
+// -----------------------------------------------------------------------
+
+void
+SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
+{
+ if ( maObjectData.maPrimary && maObjectData.maSecondary && nWidth && nHeight )
+ {
+ XtConfigureWidget( maObjectData.maPrimary,
+ nX, nY, nWidth, nHeight, 0 );
+ XtConfigureWidget( maObjectData.maSecondary,
+ 0, 0, nWidth, nHeight, 0 );
+ }
+}
+
+
+void
+SalObject::Show( BOOL bVisible )
+{
+ if ( ! maObjectData.maSystemChildData.aWindow )
+ return;
+
+ if ( bVisible )
+ XtMapWidget( (Widget)maObjectData.maPrimary );
+ else
+ XtUnmapWidget( (Widget)maObjectData.maPrimary );
+
+ maObjectData.mbVisible = bVisible;
+}
+
+// -----------------------------------------------------------------------
+
+void SalObject::Enable( BOOL bEnable )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SalObject::GrabFocus()
+{
+ if( maObjectData.mbVisible )
+ XSetInputFocus( (Display*)maObjectData.maSystemChildData.pDisplay,
+ maObjectData.maSystemChildData.aWindow,
+ RevertToNone,
+ CurrentTime );
+}
+
+// -----------------------------------------------------------------------
+
+void SalObject::SetBackground()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SalObject::SetBackground( SalColor nSalColor )
+{
+}
+
+// -----------------------------------------------------------------------
+
+const SystemChildData* SalObject::GetSystemData() const
+{
+ return &maObjectData.maSystemChildData;
+}
+
+// -----------------------------------------------------------------------
+
+void SalObject::SetCallback( void* pInst, SALOBJECTPROC pProc )
+{
+ maObjectData.mpInst = pInst;
+ if ( pProc )
+ maObjectData.mpProc = pProc;
+ else
+ maObjectData.mpProc = ImplSalObjCallbackDummy;
+}
+
+long SalObjectData::Dispatch( XEvent* pEvent )
+{
+ for( int n= 0; n < aAllObjects.Count(); n++ )
+ {
+ SalObject* pObject = aAllObjects.GetObject( n );
+ if( pEvent->xany.window == XtWindow( pObject->maObjectData.maPrimary ) ||
+ pEvent->xany.window == XtWindow( pObject->maObjectData.maSecondary ) )
+ {
+ switch( pEvent->type )
+ {
+ case UnmapNotify:
+ pObject->maObjectData.mbVisible = FALSE;
+ return 1;
+ case MapNotify:
+ pObject->maObjectData.mbVisible = TRUE;
+ return 1;
+ case ButtonPress:
+ pObject->maObjectData.mpProc(
+ pObject->maObjectData.mpInst,
+ pObject,
+ SALOBJ_EVENT_TOTOP,
+ NULL );
+ return 1;
+ case FocusIn:
+ pObject->maObjectData.mpProc(
+ pObject->maObjectData.mpInst,
+ pObject,
+ SALOBJ_EVENT_GETFOCUS,
+ NULL );
+ return 1;
+ case FocusOut:
+ pObject->maObjectData.mpProc(
+ pObject->maObjectData.mpInst,
+ pObject,
+ SALOBJ_EVENT_LOSEFOCUS,
+ NULL );
+ return 1;
+ default: break;
+ }
+ return 0;
+ }
+ }
+ return 0;
+}