Back to index

plt-scheme  4.2.1
symbol.c
Go to the documentation of this file.
00001 /*   wbuild
00002      Copyright (C) 1996  Joel N. Weber II <nemo@koa.iolani.honolulu.hi.us>
00003      
00004      This program is free software; you can redistribute it and/or
00005      modify it under the terms of the GNU General Public License
00006      as published by the Free Software Foundation; either version 2
00007      of the License, or (at your option) any later version.
00008      
00009      This program is distributed in the hope that it will be useful,
00010      but WITHOUT ANY WARRANTY; without even the implied warranty of
00011      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012      GNU General Public License for more details.
00013      
00014      You should have received a copy of the GNU General Public License
00015      along with this program; if not, write to the Free Software
00016      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 #include <config.h>
00020 
00021 #include <stdio.h>
00022 
00023 #include <libit/string.h>
00024 
00025 #include <wbuild.h>
00026 #include <wsym.h>
00027 
00028 #include <libit/malloc.h>
00029 
00030 /* These strings all pretty much translate into the text of the identifier.
00031  * Aparently they make comparisons and such easier.
00032  */
00033 STRING DOLLAR;
00034 STRING SELF;
00035 STRING DOTDOTDOT;
00036 STRING SYN_CONSTRAINT_RESOURCES;
00037 STRING NUM_SYN_CONSTRAINT_RESOURCES;
00038 STRING PARENT_PROCESS;
00039 STRING MANAGER_EXTENSION;
00040 STRING BORDER_HIGHLIGHT;
00041 STRING BORDER_UNHIGHLIGHT;
00042 STRING TRANSLATIONS;
00043 STRING ARM_AND_ACTIVATE;
00044 STRING SYN_RESOURCES;
00045 STRING NUM_SYN_RESOURCES;
00046 STRING PRIMITIVE_EXTENSION;
00047 STRING CONSTRAINT_RESOURCES;
00048 STRING CONSTRAINT_SIZE;
00049 STRING CONSTRAINT_INITIALIZE;
00050 STRING CONSTRAINT_DESTROY;
00051 STRING CONSTRAINT_SET_VALUES;
00052 STRING CONSTRAINT_EXTENSION;
00053 STRING GEOMETRY_MANAGER;
00054 STRING CHANGE_MANAGED;
00055 STRING INSERT_CHILD;
00056 STRING DELETE_CHILD;
00057 STRING CLASS_INITIALIZE;
00058 STRING CLASS_PART_INITIALIZE;
00059 STRING INITIALIZE;
00060 STRING INITIALIZE_HOOK;
00061 STRING REALIZE;
00062 STRING COMPRESS_MOTION;
00063 STRING COMPRESS_EXPOSURE;
00064 STRING COMPRESS_ENTERLEAVE;
00065 STRING VISIBLE_INTEREST;
00066 STRING DESTROY;
00067 STRING RESIZE;
00068 STRING EXPOSE;
00069 STRING SET_VALUES;
00070 STRING SET_VALUES_HOOK;
00071 STRING SET_VALUES_ALMOST;
00072 STRING GET_VALUES_HOOK;
00073 STRING ACCEPT_FOCUS;
00074 STRING QUERY_GEOMETRY;
00075 STRING DISPLAY_ACCELERATOR;
00076 STRING EXTENSION;
00077 STRING CORE;
00078 STRING RECTOBJ;
00079 STRING COMPOSITE;
00080 STRING SHELL;
00081 STRING CONSTRAINT;
00082 STRING OBJECT;
00083 STRING OVERRIDESHELL;
00084 STRING WMSHELL;
00085 STRING VENDORSHELL;
00086 STRING TRANSIENTSHELL;
00087 STRING TOPLEVELSHELL;
00088 STRING APPLICATIONSHELL;
00089 STRING XMPRIMITIVE;
00090 STRING PRIMITIVE;
00091 STRING XMMANAGER;
00092 STRING MANAGER;
00093 struct _Section action_proto;
00094 
00095 void symbol_init(void)
00096 {
00097        SELF = hash("self");
00098        DOTDOTDOT = hash("...");
00099        SYN_CONSTRAINT_RESOURCES = hash("syn_constraint_resources");
00100        NUM_SYN_CONSTRAINT_RESOURCES = hash("num_syn_constraint_resources");
00101        PARENT_PROCESS = hash("parent_process");
00102        MANAGER_EXTENSION = hash("manager_extension");
00103        BORDER_HIGHLIGHT = hash("border_highlight");
00104        BORDER_UNHIGHLIGHT = hash("border_unhighlight");
00105        TRANSLATIONS = hash("translations");
00106        ARM_AND_ACTIVATE = hash("arm_and_activate");
00107        SYN_RESOURCES = hash("syn_resources");
00108        NUM_SYN_RESOURCES = hash("num_syn_resources");
00109        PRIMITIVE_EXTENSION = hash("primitive_extension");
00110        CONSTRAINT_RESOURCES = hash("constraint_resources");
00111        CONSTRAINT_SIZE = hash("constraint_size");
00112        CONSTRAINT_INITIALIZE = hash("constraint_initialize");
00113        CONSTRAINT_DESTROY = hash("constraint_destroy");
00114        CONSTRAINT_SET_VALUES = hash("constraint_set_values");
00115        CONSTRAINT_EXTENSION = hash("constraint_extension");
00116        GEOMETRY_MANAGER = hash("geometry_manager");
00117        CHANGE_MANAGED = hash("change_managed");
00118        INSERT_CHILD = hash("insert_child");
00119        DELETE_CHILD = hash("delete_child");
00120        DISPLAY_ACCELERATOR = hash("display_accelerator");  
00121        QUERY_GEOMETRY = hash("query_geometry");
00122        CLASS_INITIALIZE = hash("class_initialize");
00123        CLASS_PART_INITIALIZE = hash("class_part_initialize");
00124        INITIALIZE = hash("initialize");
00125        INITIALIZE_HOOK = hash("initialize_hook");
00126        REALIZE = hash("realize");
00127        COMPRESS_MOTION = hash("compress_motion");
00128        COMPRESS_EXPOSURE = hash("compress_exposure");
00129        COMPRESS_ENTERLEAVE = hash("compress_enterleave");
00130        VISIBLE_INTEREST = hash("visible_interest");
00131        DESTROY = hash("destroy");
00132        RESIZE = hash("resize");
00133        EXPOSE = hash("expose");
00134        SET_VALUES = hash("set_values");
00135        SET_VALUES_HOOK = hash("set_values_hook");
00136        SET_VALUES_ALMOST = hash("set_values_almost");
00137        GET_VALUES_HOOK = hash("get_values_hook");
00138        ACCEPT_FOCUS = hash("accept_focus");
00139        EXTENSION = hash("extension");
00140        CORE = hash("Core");
00141        RECTOBJ = hash("RectObj");
00142        OBJECT = hash("Object");
00143        COMPOSITE = hash("Composite");
00144        SHELL = hash("Shell");
00145        OVERRIDESHELL = hash("OverrideShell");
00146        WMSHELL = hash("WMShell");
00147        VENDORSHELL = hash("VendorShell");
00148        TRANSIENTSHELL = hash("TransientShell");
00149        TOPLEVELSHELL = hash("TopLevelShell");
00150        APPLICATIONSHELL = hash("ApplicationShell");
00151        CONSTRAINT = hash("Constraint");
00152        XMPRIMITIVE = hash("Xm/XmPrimitive");
00153        PRIMITIVE = hash("XmPrimitive");
00154        XMMANAGER = hash("Xm/Manager");
00155        MANAGER = hash("XmManager");
00156        DOLLAR = hash("$");
00157        action_proto.decl = malloc(sizeof(struct _Decl));
00158        action_proto.decl->type = hash("void");
00159        action_proto.decl->params = malloc(sizeof(struct _Decl));
00160        action_proto.decl->params->type = 0;
00161        action_proto.decl->params->name = DOLLAR;
00162        action_proto.decl->params->suffix = 0;
00163        action_proto.decl->params->next = malloc(sizeof(struct _Decl));
00164        action_proto.decl->params->next->type = hash("XEvent*");
00165        action_proto.decl->params->next->name = hash("event");
00166        action_proto.decl->params->next->suffix = 0;
00167        action_proto.decl->params->next->next = malloc(sizeof(struct _Decl));
00168        action_proto.decl->params->next->next->type = hash("String*");;
00169        action_proto.decl->params->next->next->name = hash("params");
00170        action_proto.decl->params->next->next->suffix = 0;
00171        action_proto.decl->params->next->next->next =
00172               malloc(sizeof(struct _Decl));
00173        action_proto.decl->params->next->next->next->type = hash("Cardinal*");
00174        action_proto.decl->params->next->next->next->name = hash("num_params");
00175        action_proto.decl->params->next->next->next->suffix = 0;
00176        action_proto.decl->params->next->next->next->next = NULL;
00177 }