From 7168e46fae4ed617779fef56e80b2ad0de31fc29 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 11 Mar 2004 18:24:41 +0000 Subject: [PATCH] Modifiche per la versione linux git-svn-id: svn://10.65.10.50/trunk@11833 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/oslinux.cpp | 35 +++++++++++++++++++++++++++++++++-- xvaga/oslinux.h | 2 ++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/xvaga/oslinux.cpp b/xvaga/oslinux.cpp index 73c4161d4..52fe962d0 100755 --- a/xvaga/oslinux.cpp +++ b/xvaga/oslinux.cpp @@ -36,7 +36,7 @@ int OsLinux_EnumerateFamilies(char** families, int max_count) size_t i; for (i = 0; i < items; i++) - strcpy(families[i], (*fonts)[i].c_str()); + families[i] = xvt_str_duplicate((*fonts)[i].c_str()); return items; } @@ -66,7 +66,7 @@ void OsLinux_PlaceProcessInWindow(unsigned int instance, const char* name, unsig void OsLinux_UpdateWindow(unsigned int handle) { - SORRY_BOX(); + // non deve fare nulla in Linux, sembra di si verificare SORRY_BOX(); } /////////////////////////////////////////////////////////// @@ -259,3 +259,34 @@ int64_t OsLinux_GetDiskFreeSpace(const char * path) return nBytes; } + +void OsLinux_SetCaptionStyle(wxWindow * w, bool set) +{ +// long decor = 0L; +// const long style = w->GetWindowStyle(); +// if ((style & wxSIMPLE_BORDER) || (style & wxNO_BORDER)) +// { +// decor = 0L; +// } +// else +// { +/* decor = (long) GDK_DECOR_BORDER; + if ((style & wxCAPTION) != 0) + decor |= GDK_DECOR_TITLE; + if ((style & wxSYSTEM_MENU) != 0) + decor |= GDK_DECOR_MENU; + if ((style & wxMINIMIZE_BOX) != 0) + decor |= GDK_DECOR_MINIMIZE; + if ((style & wxMAXIMIZE_BOX) != 0) + decor |= GDK_DECOR_MAXIMIZE; + if ((style & wxRESIZE_BORDER) != 0) + decor |= GDK_DECOR_RESIZEH; + if (set) + decor |= GDK_DECOR_TITLE; + else + decor &= ~GDK_DECOR_TITLE; + } + gdk_window_set_decorations( ((GtkWidget *)w->GetHandle())->window, (GdkWMDecoration) decor); */ +} + + diff --git a/xvaga/oslinux.h b/xvaga/oslinux.h index 3f8206d24..c0944166d 100755 --- a/xvaga/oslinux.h +++ b/xvaga/oslinux.h @@ -20,3 +20,5 @@ bool OsLinux_SL_WriteBlock(unsigned short reg, unsigned short size, const unsign void OsLinux_GetFileSys(const char* path, char * dev, char * dir, char * type); bool OsLinux_IsNetworkDrive(const char * path); int64_t OsLinux_GetDiskFreeSpace(const char * path); +void OsLinux_SetCaptionStyle(wxWindow * w, bool set); +