/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/languages/C/Samples/XLib/fonts.c

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <X11/Xlib.h>
 
3
#include <X11/Intrinsic.h>
 
4
 
 
5
//#include <X11/Shell.h>
 
6
//#include <X11/Xaw/Cardinals.h>
 
7
#include <X11/Xaw/Label.h>
 
8
 
 
9
XrmOptionDescRec AppOptions[] = {
 
10
};
 
11
XtResource ListResources[] = {
 
12
    {"label","Label",String,sizeof(String),XtOffset(LabelWidget,label.label),"Hell",(XtPointer)NULL)
 
13
};
 
14
 
 
15
main(int argc, char **argv)
 
16
{
 
17
    Display *AppDisplay;
 
18
    XtAppContext AppContext;
 
19
    Widget AppWidget;
 
20
 
 
21
/*    int Scr1;
 
22
    Window Wind1;
 
23
    Window RootWind;
 
24
    int err;        */
 
25
    
 
26
/*    AppDisplay=XOpenDisplay(NULL);
 
27
    Scr1=XDefaultScreen(Dsp1);
 
28
    RootWind=XDefaultRootWindow(Dsp1);
 
29
    Wind1=XCreateSimpleWindow(Dsp1,RootWind,1,1,100,100,0,0,0);
 
30
    XMapRaised(Dsp1,RootWind);*/
 
31
    
 
32
    AppWidget=XtAppInitialize(&AppContext,"Fonts",AppOptions,XtNumber(AppOptions),&argc,argv,NULL,NULL,0);
 
33
    XtCreateManagedWidget("Fonts",labelWidgetClass,AppWidget,0,0);
 
34
    XtRealizeWidget(AppWidget);
 
35
 
 
36
//    XInternAtom(XtDisplay(AppWidget),"WM
 
37
//    XSetWMProtocols(XtDisplay(AppWidget),XtWindow(AppWidget),NULL,0);
 
38
    XtAppMainLoop(AppContext);
 
39
 
 
40
}