1. C Question/Fake Modal
- Posted by David Cuny <dcuny at LANSET.COM> Jun 27, 1998
- 1003 views
[C Question] I've been looking various X Windows tools and desktops, in hope of eventually porting WinMan to the X Windows platform - assuming I ever get it completed. Anyway, at a minimum, it would need to talk to the Xlib library, which defines the basic graphic calls to X Windows. Optimally, I could select a widget library (such as LessTif, GTK or Qt) to link it to, and just add wrappers to their widget set. In either event, I would need to *link* Euphoria to the required libraries. To add Win32 functions to Euphoria, Rob added tools that let us link to the Win32 DLL (Dynamic Link Libraries). This gave the programs access to functions that were not initially linked into Euphoria when it was compiled. In looking at various Unix/Linux toolkits, I occasionally run across references to something that *seems* to offer the same functionality as DLLs. Obviously, if this mechanism existed, I'd love it if Robert could include access to it in the Linux release. That would keep the Linux release small, but still let us access our favorite toolkits. My question(s): Does Unix/Linux offer an equivalent to Windows DLLs? What is it? Where can I find out more about this? [Fake Modal for Win32Lib] I ran across a Win32 function called SetCapture() that limits all mouse output to a single window. My machine is still limping by on 80 megs, so I haven't been able to test this, but it seems like the best way of simulating modal windows. I'll try to add it into Win32Lib when I get my machine back together. -- David Cuny
2. Re: C Question/Fake Modal
- Posted by Monty King <boot_me at GEOCITIES.COM> Jun 28, 1998
- 1001 views
>In looking at various Unix/Linux toolkits, I occasionally run across >references to something that *seems* to offer the same functionality as >DLLs. David, I have been looking at installing Linux on my system here, but have decided that they can't tell me for sure if it will work with my mb's chipset, though I am pretty sure it will, but I could experience a lockup if using a k-6 processor...etc.etc. Anyway, I have been reading various docs, and was wondering if you have read the linux booklet, available from: http://sunsite.unc.edu/LDP/LDP/gs/node3.html The pages above are labeled node1, node2, node3, etc. Anyway, it talks about dynamic links... here is a quote, not sure if it will do any good. ( I added more than was necessary to show everyone how cool this OS would be to use:::) Linux provides a complete implementation of TCP/IP networking software. This includes device drivers for many popular Ethernet cards, SLIP (Serial Line Internet Protocol) and PPP (Point-to-Point Protocol), which provide access to a TCP/IP network via a serial connection, PLIP (Parallel Line Internet Protocol), and NFS (Network File System). The complete range of TCP/IP clients and services is also supported, which includes FTP, telnet, NNTP, and SMTP. We'll talk more about networking in Chapter . The Linux kernel is developed to use protected-mode features of Intel 80386 and better processors. In particular, Linux uses the protected-mode, descriptor based, memory-management paradigm, and other advanced features. Anyone familiar with 80386 protected-mode programming knows that this chip was designed for multitasking systems like UNIX. Linux exploits this functionality. The kernel supports demand-paged, loaded executables. Only those segments of a program which are actually in use are read into memory from disk. Also, copy-on-write pages are shared among executables. If several instances of a program are running at once, they share physical memory, which reduces overall usage. In order to increase the amount of available memory, Linux also implements disk paging. Up to one gigabyte of swap space may be allocated on disk (upt to 8 partitions of 128 megabytes each). When the system requires more physical memory, it swaps inactive pages to disk, letting you run larger applications and support more users. However, swapping data to disk is no substitute for physical RAM, which is much faster. The Linux kernel also implements a unified memory pool for user programs and disk cache. All free memory is used by the cache, which is reduced when running large programs. Executables use dynamically linked, shared libraries: code from a single library on disk. This is not unlike the SunOS shared library mechanism. Executable files occupy less disk space, especially those which use many library functions. There are also statically linked libraries for object debugging and maintaining ``complete'' binary files when shared libraries are not installed. The libraries are dynamically linked at run time, and the programmer can use his or her own routines in place of the standard library routines. To facilitate debugging, the kernel generates core dumps for post-mortem analysis. A core dump and an executable linked with debugging support allows a developer to determine what caused a program to crash. end quote... My main question is, I know that I can use loadlin (or linux loader) to use multiple OS's, but am not sure how to go about fdisking to where I can keep my existing software in a dos partition without risking (keyword here) losing my win95 system...as I use it all of the time. (Is this why your system is not up now David? You put Linux on?) Well, anyway, My copy of Debian came from a magazine released version (Boot Magazine) and is a bit stripped down, but contains all of what I need to get it up and running I am assured. Monty in Oregon
3. Re: C Question/Fake Modal
- Posted by Jacques Deschenes <desja at GLOBETROTTER.QC.CA> Jun 27, 1998
- 994 views
- Last edited Jun 28, 1998
--=====================_899011655==_ At 11:53 27-06-98 -0700, you wrote: >[Fake Modal for Win32Lib] > >I ran across a Win32 function called SetCapture() that limits all mouse >output to a single window. My machine is still limping by on 80 megs, so >I haven't been able to test this, but it seems like the best way of >simulating modal windows. I'll try to add it into Win32Lib when I get my >machine back together. > >-- David Cuny > No David, SetCapture() is not good for that purpose. First of all it only affect the mouse not the keyboard. Second all the controls in the dialogs won't react to the mouse either, even the sysmenu or close box won't see the mouse as long as it is capture only the client area of the capturing windows will see it. SetCapture() it to be used when dragging or resizing object with the mouse. By capturing the window still receive the mouse messages when the mouse pointer is getting out of the client area. To better understand it see Charles Petzold example in chapter 6 Blockout2.c I send you again my tstmadal.exw file that simulate a modal window by regiving the focus to the window that loose it. The idea is simple, each time a window loose focus it receive a WM_KILLFOCUS message. So when the dialog receive this message it check if it is it's parent window that is trying to regain focus. If it is the case it use SetFocus(self) to regain focus. The make the dialog application modal. See my tstmodal.ew --=====================_899011655==_