⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_topo.h

📁 MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis的0.9.5版本的源码。
💻 H
字号:
//  This file is part of MANTIS OS, Operating System//  See http://mantis.cs.colorado.edu/////  Copyright (C) 2003-2005 University of Colorado, Boulder////  This program is free software; you can redistribute it and/or//  modify it under the terms of the mos license (see file LICENSE)/**************************************************************************//* File:    gui_tree.h                                                    *//* Author     Jeff Rose   :  rosejn@colorado.edu                          *//*   Date: 03/25/04                                                       *//*                                                                        *//* A gnome canvas topology display module.                                *//**************************************************************************/#ifndef _GUI_TOPO_H_#define _GUI_TOPO_H_#include <gtk/gtk.h>#include <libgnomecanvas/libgnomecanvas.h>//#define TOPO_SIZE 400 // Size of the topology widget in pixels (and canvas region)#define TOPO_NUM_NODES 10#define TOPO_NODE_SIZE 20#define TOPO_RADIUS    150#define TOPO_LABEL_SIZE 6#define TOPO_SPACING 20#define TOPO_SPACING_OFFSET 5#define TOPO_UNCONF_ROWS 3#define TOPO_NODE_BASE_STATION 0#define TOPO_NODE_REGULAR 1#define TOPO_NODE_INACTIVE 2#define TOPO_NODE_UNCONFIGURED 3#define TOPO_BG_FILENAME "glade/bg.png"#define TOPO_BG_OFFSET 80#define TOPO_BG_LINE_WIDTH 3#define TOPO_BG_LINE_COLOR "black"typedef struct _gui_topo{   GtkWidget *widget;   GHashTable *nodes;   GHashTable *unconf_nodes;   GnomeCanvasItem *bg;   gint selected;}gui_topo_t;typedef struct _topo_node{   gui_topo_t *gui_topo;   GnomeCanvasItem *group;   GnomeCanvasItem *node;   GnomeCanvasItem *edge;   GnomeCanvasPoints *points;   GnomeCanvasItem *label;   gchar *text;   gint id;   gint type;   gdouble x, y, z;}topo_node_t;/* Create a new gtk topo view widget. */gui_topo_t *gui_topo_new(GtkWidget *container);/* Add a new node to a topo view. */void gui_topo_node_new (gui_topo_t *topo, gint id, gint light, gint temp);void gui_topo_node_new_pos (gui_topo_t *topo, gint id, gdouble x, gdouble y, gdouble z);/* Update a node in a topology. */void gui_topo_node_update (gui_topo_t *topo, gint id, gint light, gint temp);void gui_topo_node_update_pos (gui_topo_t *topo, gint id, gdouble x, gdouble y, gdouble z);/* Highlight the currently selected node. */void gui_topo_set_current_node (gui_topo_t *topo, gint id);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -