First replicant yay
This commit is contained in:
10
libXmd/include/Xmd/Dir.h
Normal file
10
libXmd/include/Xmd/Dir.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef _XmdDir_h
|
||||
#define _XmdDir_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/* XmdDirGetUser returns the location of the Xmd user directory, which is
|
||||
located at $HOME/.Xmd */
|
||||
String XmdDirGetUser ();
|
||||
|
||||
#endif
|
||||
12
libXmd/include/Xmd/Error.h
Normal file
12
libXmd/include/Xmd/Error.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef _XmdError_h
|
||||
#define _XmdError_h
|
||||
|
||||
typedef enum {
|
||||
XmdErrorNone,
|
||||
XmdErrorOutOfMemory,
|
||||
XmdErrorFileNotFound,
|
||||
XmdErrorCantOpenFile,
|
||||
XmdErrorBadSyntax
|
||||
} XmdError;
|
||||
|
||||
#endif
|
||||
@@ -11,8 +11,11 @@
|
||||
/* XmdReplicantState contains state information for a replicant instance. */
|
||||
typedef struct _XmdReplicantState XmdReplicantState;
|
||||
|
||||
typedef int (*XmdReplicantVersion) ();
|
||||
typedef Widget (*XmdReplicantCreate) (Widget parent, XmdReplicantState *state);
|
||||
typedef int (*XmdReplicantFnVersion) ();
|
||||
typedef void (*XmdReplicantFnConstruct) ();
|
||||
typedef void (*XmdReplicantFnDestruct) ();
|
||||
typedef Widget (*XmdReplicantFnCreate) (
|
||||
Widget parent, XmdReplicantState *state);
|
||||
|
||||
/* XmdReplicantOpen opens a replicant from the file located at path. Replicant
|
||||
files hold state and point to shared object files containing their code.
|
||||
@@ -36,6 +39,12 @@ typedef Widget (*XmdReplicantCreate) (Widget parent, XmdReplicantState *state);
|
||||
Version must return the value of XmdREPLICANT_VERSION. This is used to detect
|
||||
the API version that the replicant was compiled with, and applications with a
|
||||
different API version will refuse to load it.
|
||||
|
||||
void NAME_XmdReplicantConstruct ();
|
||||
Construct is called when the shared object is loaded.
|
||||
|
||||
void NAME_XmdReplicantDestruct ();
|
||||
Descruct is called before the shared object is unloaded.
|
||||
|
||||
Widget NAME_XmdReplicantCreate (Widget parent, XmdReplicantState *state);
|
||||
Create instantiates a new widget representing the replicant given by state.
|
||||
|
||||
Reference in New Issue
Block a user