Click here to Skip to main content
15,892,059 members
Articles / Desktop Programming / X11

Programming Xlib with Mono Develop - Part 2: Athena widgets (proof of concept)

Rate me:
Please Sign up or sign in to vote.
4.89/5 (4 votes)
14 Sep 2013CPOL12 min read 30.6K   231   5  
How to call native Xt API from Mono Develop C# ending up in a very little Athena widget application.
/* Based on MIT's copywritten Template widget.  Modifications copyright circa
   1992 by James Morris and John Grotzinger.  Permissions to use etc are 
   granted as per those in the X11 copyright.  No warranties or guaranties 
   are made implicity or explicity; no responsiblity is taken for anything 
   involving use of this software; no claims are made as to its performance 
   or any other aspect; use at your own risk. */

#ifndef _CanvasP_h
#define _CanvasP_h

#include "Canvas.h"
/* include superclass private header file */
#include <X11/CoreP.h>

/* define unique representation types not found in <X11/StringDefs.h> */

typedef struct {
    int empty;
} CanvasClassPart;

typedef struct _CanvasClassRec {
    CoreClassPart	core_class;
    CanvasClassPart	canvas_class;
} CanvasClassRec;

extern CanvasClassRec canvasClassRec;

typedef struct {
    /* resources */
    /* none */

    /* private state */
    GC gc;
    Pixmap pixmap;  /* same as backgroundPixmap */
    Boolean needpixmap;
} CanvasPart;

typedef struct _CanvasRec {
    CorePart   	core;
    CanvasPart	canvas;
} CanvasRec;

#endif /* _CanvasP_h */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader Celonis SA
Germany Germany
I am currently the CEO of Symbioworld GmbH and as such responsible for personnel management, information security, data protection and certifications. Furthermore, as a senior programmer, I am responsible for the automatic layout engine, the simulation (Activity Based Costing), the automatic creation of Word/RTF reports and the data transformation in complex migration projects.

The main focus of my work as a programmer is the development of Microsoft Azure Services using C# and Visual Studio.

Privately, I am interested in C++ and Linux in addition to C#. I like the approach of open source software and like to support OSS with own contributions.

Comments and Discussions