Release 0.4.10
[wine/hacks.git] / misc / xt.c
blob8d386ae87d46917e17ee6816fd6e159f970002ba
1 /*
2 * X toolkit functions
4 * Copyright 1993 Alexandre Julliard
5 */
7 static char Copyright[] = "Copyright Alexandre Julliard, 1993";
9 #include <sys/param.h>
10 #include <sys/times.h>
12 #include <X11/Intrinsic.h>
13 #include <X11/StringDefs.h>
14 #include <X11/Core.h>
15 #include <X11/Shell.h>
17 #include "windows.h"
19 #ifdef __NetBSD__
20 #define HZ 100
21 #endif
23 Display * XT_display;
24 Screen * XT_screen;
25 XtAppContext XT_app_context;
27 static Widget topLevelWidget;
30 /***********************************************************************
31 * main
33 void main(int argc, char **argv)
35 topLevelWidget = XtVaAppInitialize(&XT_app_context,
36 "XWine", /* Application class */
37 NULL, 0, /* Option list */
38 &argc, argv, /* Command line args */
39 NULL, /* Fallback resources */
40 NULL );
41 XT_display = XtDisplay( topLevelWidget );
42 XT_screen = XtScreen( topLevelWidget );
44 _WinMain( argc, argv );
49 /********************************************************************
51 * Miscellaneous partially implemented functions.
56 void MessageBeep( WORD i )
58 XBell(XT_display, 100);
61 WORD RegisterWindowMessage( LPSTR str )
63 printf( "RegisterWindowMessage: '%s'\n", str );
64 return 0xc000;
67 /***********************************************************************
68 * GetTickCount (USER.13)
70 DWORD GetTickCount()
72 struct tms dummy;
73 return (times(&dummy) * 1000) / HZ;
77 int GetSystemMetrics( short index )
79 printf( "GetSystemMetrics: %d\n", index );
80 switch(index)
82 case SM_CXSCREEN:
83 return DisplayWidth( XT_display, DefaultScreen( XT_display ));
85 case SM_CYSCREEN:
86 return DisplayHeight( XT_display, DefaultScreen( XT_display ));
88 default:
89 return 0;
93 void AdjustWindowRect( LPRECT rect, DWORD style, BOOL menu )
95 printf( "AdjustWindowRect: (%d,%d)-(%d,%d) %d %d\n", rect->left, rect->top,
96 rect->right, rect->bottom, style, menu );
100 HMENU CreateMenu() { return 0; }
102 BOOL AppendMenu( HMENU hmenu, WORD flags, WORD id, LPSTR text ) { return TRUE;}
104 BOOL DestroyMenu( HMENU hmenu ) { return TRUE; }