From: erg Date: Mon, 13 Sep 2010 22:25:25 +0000 (+0000) Subject: Declare static functions in glcompui.c only used locally; X-Git-Tag: LAST_LIBGRAPH~32^2~1187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10622b8734a2477b81b4aa161c2c76d6ca1726f4;p=graphviz Declare static functions in glcompui.c only used locally; add declarations of real global functions to glcompui.h; add include of glcompui.h to glutrender.c --- diff --git a/cmd/smyrna/glutrender.c b/cmd/smyrna/glutrender.c index f51cca747..f664b7523 100644 --- a/cmd/smyrna/glutrender.c +++ b/cmd/smyrna/glutrender.c @@ -19,8 +19,7 @@ #include "arcball.h" #include "appmouse.h" #include "glexpose.h" - - +#include "glcompui.h" /*call backs */ diff --git a/cmd/smyrna/gui/glcompui.c b/cmd/smyrna/gui/glcompui.c index 28ba7b1ba..ba9b9cf7b 100644 --- a/cmd/smyrna/gui/glcompui.c +++ b/cmd/smyrna/gui/glcompui.c @@ -141,7 +141,7 @@ void switch2D3D(glCompObj *obj, GLfloat x, GLfloat y, } -void CBglCompMouseUp(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) +static void CBglCompMouseUp(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) { /* glCompMouse* m=&((glCompSet*)obj)->mouse; */ sel->common.visible = 0; @@ -150,7 +150,7 @@ void CBglCompMouseUp(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) } -void CBglCompMouseRightClick(glCompObj *obj, GLfloat x, GLfloat y, +static void CBglCompMouseRightClick(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) { if (t == glMouseRightButton) @@ -160,15 +160,12 @@ void CBglCompMouseRightClick(glCompObj *obj, GLfloat x, GLfloat y, } } -void attrList(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) +static void attrList(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t) { showAttrsWidget(view->Topview); } - - - -void glCompMouseMove(glCompObj *obj, GLfloat x, GLfloat y) +static void glCompMouseMove(glCompObj *obj, GLfloat x, GLfloat y) { glCompMouse *m = &((glCompSet *) obj)->mouse; @@ -184,7 +181,7 @@ void glCompMouseMove(glCompObj *obj, GLfloat x, GLfloat y) glexpose(); } } -void selectedges(glCompObj *obj, GLfloat x, GLfloat y) +static void selectedges(glCompObj *obj, GLfloat x, GLfloat y) { if(view->Topview->sel.selectEdges==0) view->Topview->sel.selectEdges=1; @@ -192,7 +189,7 @@ void selectedges(glCompObj *obj, GLfloat x, GLfloat y) view->Topview->sel.selectEdges=0; } -void selectnodes(glCompObj *obj, GLfloat x, GLfloat y) +static void selectnodes(glCompObj *obj, GLfloat x, GLfloat y) { if(view->Topview->sel.selectNodes==0) view->Topview->sel.selectNodes=1; @@ -200,6 +197,7 @@ void selectnodes(glCompObj *obj, GLfloat x, GLfloat y) view->Topview->sel.selectNodes=0; } +#if 0 void testContainer(glCompSet *s) { glCompPanel* p; @@ -217,7 +215,7 @@ void testContainer(glCompSet *s) p->common.anchor.top=10; p->common.anchor.right=10; } - +#endif glCompSet *glcreate_gl_topview_menu(void) @@ -383,6 +381,7 @@ glCompSet *glcreate_gl_topview_menu(void) } +#if 0 int getIconsDirectory(char *bf) { #ifdef WIN32 @@ -396,3 +395,4 @@ int getIconsDirectory(char *bf) return 1; } +#endif diff --git a/cmd/smyrna/gui/glcompui.h b/cmd/smyrna/gui/glcompui.h index 449d15947..1f1e8af96 100644 --- a/cmd/smyrna/gui/glcompui.h +++ b/cmd/smyrna/gui/glcompui.h @@ -23,6 +23,11 @@ extern "C" { #endif extern glCompSet *glcreate_gl_topview_menu(void); + extern void switch2D3D(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); + extern void menu_click_center(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); + extern void menu_click_zoom_minus(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); + extern void menu_click_zoom_plus(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); + extern void menu_click_pan(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); #ifdef __cplusplus } /* end extern "C" */