aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-26 15:50:54 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-26 15:50:54 +0000
commit04d7f87e664d5d09b03a23fbdbc976577a3c198d (patch)
treeaa95eb67a51f0ec9e4297b3c1b443611d8653c2e
parent2b04cb5317b275cbdd0f71dae1b021ad7bba348d (diff)
add display container stub
-rw-r--r--Display.c69
-rw-r--r--Display.h11
-rw-r--r--DisplayP.h30
-rw-r--r--Makefile2
4 files changed, 111 insertions, 1 deletions
diff --git a/Display.c b/Display.c
new file mode 100644
index 0000000..6cf011f
--- /dev/null
+++ b/Display.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include "DisplayP.h"
+
+#define Offset(field) XtOffsetOf(DisplayRec, display.field)
+static XtResource resources[] = {
+};
+
+#undef Offset
+
+static CompositeClassExtensionRec compositeExtension = {
+ .next_extension = NULL,
+ .record_type = NULLQUARK,
+ .version = XtCompositeExtensionVersion,
+ .record_size = sizeof(CompositeClassExtensionRec),
+ .accepts_objects = True,
+ .allows_change_managed_set = False,
+};
+
+DisplayClassRec displayClassRec = {
+ .core_class = {
+ .superclass = (WidgetClass)&compositeClassRec,
+ .class_name = "Display",
+ .widget_size = sizeof(DisplayRec),
+ .class_initialize = NULL,
+ .class_part_initialize = NULL,
+ .class_inited = False,
+ .initialize = NULL,
+ .initialize_hook = NULL,
+ .realize = XtInheritRealize,
+ .actions = NULL,
+ .num_actions = 0,
+ .resources = resources,
+ .num_resources = XtNumber(resources),
+ .xrm_class = NULLQUARK,
+ .compress_motion = True,
+ .compress_exposure = True,
+ .compress_enterleave = True,
+ .visible_interest = False,
+ .destroy = NULL,
+ .resize = NULL,
+ .expose = NULL,
+ .set_values = NULL,
+ .set_values_hook = NULL,
+ .set_values_almost = XtInheritSetValuesAlmost,
+ .get_values_hook = NULL,
+ .accept_focus = NULL,
+ .version = XtVersion,
+ .callback_private = NULL,
+ .tm_table = NULL,
+ .query_geometry = XtInheritQueryGeometry,
+ .display_accelerator = XtInheritDisplayAccelerator,
+ .extension = NULL,
+ },
+ .composite_class = {
+ .geometry_manager = XtInheritGeometryManager,
+ .change_managed = XtInheritChangeManaged,
+ .insert_child = XtInheritInsertChild,
+ .delete_child = XtInheritDeleteChild,
+ .extension = NULL,
+ },
+ .display_class = {
+ .extension = NULL,
+ }
+};
+
+WidgetClass displayWidgetClass = (WidgetClass) & displayClassRec;
diff --git a/Display.h b/Display.h
new file mode 100644
index 0000000..b5f5172
--- /dev/null
+++ b/Display.h
@@ -0,0 +1,11 @@
+/* $Id$ */
+
+#ifndef _Display_h
+#define _Display_h
+
+typedef struct _DisplayClassRec *DisplayWidgetClass;
+typedef struct _DisplayRec *DisplayWidget;
+
+extern WidgetClass displayWidgetClass;
+
+#endif
diff --git a/DisplayP.h b/DisplayP.h
new file mode 100644
index 0000000..1162967
--- /dev/null
+++ b/DisplayP.h
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+#ifndef _DisplayP_h
+#define _DisplayP_h
+
+#include "Display.h"
+
+typedef struct {
+ char* resource;
+ char *private;
+} DisplayPart;
+
+typedef struct _DisplayRec {
+ CorePart core;
+ DisplayPart display;
+} DisplayRec;
+
+typedef struct {
+ XtPointer extension;
+} DisplayClassPart;
+
+typedef struct _DisplayClassRec {
+ CoreClassPart core_class;
+ CompositeClassPart composite_class;
+ DisplayClassPart display_class;
+} DisplayClassRec;
+
+extern DisplayClassRec displayClassRec;
+
+#endif
diff --git a/Makefile b/Makefile
index aa1f8f7..77029f6 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
VERSION=3.0
PROG= spectrogram
-SRCS= spectrogram.c fft.c cms.c aux.c widget.c Sgraph.c
+SRCS= spectrogram.c fft.c cms.c aux.c widget.c Sgraph.c Display.c
LIBS= fftw3 xt xext xrender
BINDIR= /usr/local/bin