Riferimenti per il file brainwm_plugin.c

#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <libxfce4util/i18n.h>
#include <libxfce4util/util.h>
#include <brain-mcs-manager/manager-plugin.h>
#include <libxfcegui4/libxfcegui4.h>
#include <glib.h>
#include "window_manager_icon.h"
#include <config.h>
#include <brain_client.h>
#include <brain_settings.h>
#include <gtk_common/gtk_common.h>

Strutture dati

struct  _TitleRadioButton
struct  _TitleButton
struct  _TitleButtonData
struct  _MenuTmpl
struct  _WMThemeInfo
struct  BrainWMDialog

Definizioni

#define CHANNEL   "BRAINWM"
#define PLUGIN_NAME   "brainwm"
#define DEFAULT_THEME   "default"
#define DEFAULT_KEY_THEME   "default.keys"
#define DEFAULT_LAYOUT   "OTS|HMC"
#define DEFAULT_ACTION   "maximize"
#define DEFAULT_ALIGN   "center"
#define DEFAULT_FONT   "Sans Bold 10"
#define MAX_ELEMENTS_BEFORE_SCROLLING   6
#define STATES   7
#define STATE_HIDDEN   (STATES - 1)

Ridefinizioni di tipo (typedefs)

typedef _TitleRadioButton TitleRadioButton
typedef _TitleButton TitleButton
typedef _TitleButtonData TitleButtonData
typedef _MenuTmpl MenuTmpl
typedef _WMThemeInfo WMThemeInfo

Tipi enumerati (enum)

enum  ThemeType { DECORATION_THEMES = 0, KEYBINDING_THEMES = 1 }
enum  {
  TITLE = 0, MENU, SHADE, HIDE,
  MAXIMIZE, CLOSE, END
}
enum  { WM_THEME_NAME_COLUMN, WM_N_COLUMNS }

Funzioni

static void run_dialog (BrainMcsPlugin *mcs_plugin)
static gboolean glib22_str_has_suffix (const gchar *str, const gchar *suffix)
static void sensitive_cb (GtkWidget *widget, gpointer user_data)
static void cb_layout_destroy_button (GtkWidget *widget, gpointer user_data)
static void cb_layout_value_changed (GtkWidget *widget, gpointer user_data)
static GtkWidget * create_layout_buttons (gchar *layout, gpointer user_data)
static GtkWidget * create_option_menu_box (MenuTmpl template[], guint size, gchar *display_label, gchar *value, GCallback handler, gpointer user_data)
static void theme_info_free (WMThemeInfo *info)
static WMThemeInfofind_theme_info_by_name (const gchar *theme_name, GList *theme_list)
static gboolean parserc (const gchar *filename, gboolean *set_layout, gboolean *set_align, gboolean *set_font)
static GList * update_theme_dir (const gchar *theme_dir, GList *theme_list)
static GList * themes_common_list_add_dir (const char *dirname, GList *theme_list)
static GList * theme_common_init (GList *theme_list)
static gboolean dialog_update_from_theme (BrainWMDialog *itf, const gchar *theme_name, GList *theme_list)
static void decoration_selection_changed (GtkTreeSelection *selection, gpointer data)
static void keybinding_selection_changed (GtkTreeSelection *selection, gpointer data)
static GList * read_themes (GList *theme_list, GtkWidget *treeview, GtkWidget *swindow, ThemeType type, gchar *current_value)
static gint sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
static void cb_click_to_focus_changed (GtkWidget *dialog, gpointer user_data)
static void cb_focus_new_changed (GtkWidget *dialog, gpointer user_data)
static void cb_raise_on_focus_changed (GtkWidget *dialog, gpointer user_data)
static void cb_raise_delay_changed (GtkWidget *dialog, gpointer user_data)
static void cb_raise_on_click_changed (GtkWidget *dialog, gpointer user_data)
static void cb_snap_to_border_changed (GtkWidget *dialog, gpointer user_data)
static void cb_snap_to_windows_changed (GtkWidget *dialog, gpointer user_data)
static void cb_snap_width_changed (GtkWidget *dialog, gpointer user_data)
static void cb_wrap_resistance_changed (GtkWidget *dialog, gpointer user_data)
static void cb_wrap_workspaces_changed (GtkWidget *dialog, gpointer user_data)
static void cb_wrap_windows_changed (GtkWidget *dialog, gpointer user_data)
static void cb_box_move_changed (GtkWidget *dialog, gpointer user_data)
static void cb_box_resize_changed (GtkWidget *dialog, gpointer user_data)
static void cb_dblclick_action_value_changed (GtkWidget *widget, gpointer user_data)
static void cb_title_align_value_changed (GtkWidget *widget, gpointer user_data)
static void font_selection_ok (GtkWidget *w, gpointer user_data)
static void show_font_selection (GtkWidget *widget, gpointer user_data)
static void cb_dialog_response (GtkWidget *dialog, gint response_id)
BrainWMDialogcreate_dialog (BrainMcsPlugin *mcs_plugin)
static void setup_dialog (BrainWMDialog *itf)
static int create_channel (BrainMcsPlugin *mcs_plugin)
BrainMcsPluginInitResult mcs_plugin_init (BrainMcsPlugin *mcs_plugin)

Variabili

TitleButton title_buttons []
MenuTmpl dbl_click_values []
MenuTmpl title_align_values []
static gboolean setting_model = FALSE
static gboolean is_running = FALSE
static gchar * current_theme = NULL
static gchar * current_key_theme = NULL
static gchar * current_layout = NULL
static gchar * current_font = NULL
static gchar * dbl_click_action = NULL
static gchar * title_align = NULL
static gboolean click_to_focus = TRUE
static gboolean focus_new = TRUE
static gboolean focus_raise = FALSE
static gboolean raise_on_click = TRUE
static gboolean snap_to_border = TRUE
static gboolean snap_to_windows = FALSE
static gboolean wrap_workspaces = FALSE
static gboolean wrap_windows = TRUE
static gboolean box_move = FALSE
static gboolean box_resize = FALSE
static int raise_delay
static int snap_width
static int wrap_resistance
static TitleRadioButton title_radio_buttons [END]
static GList * decoration_theme_list = NULL
static GList * keybinding_theme_list = NULL
BrainWMDialogDialog


Documentazione delle definizioni

#define CHANNEL   "BRAINWM"
 

#define PLUGIN_NAME   "brainwm"
 

#define DEFAULT_THEME   "default"
 

#define DEFAULT_KEY_THEME   "default.keys"
 

#define DEFAULT_LAYOUT   "OTS|HMC"
 

#define DEFAULT_ACTION   "maximize"
 

#define DEFAULT_ALIGN   "center"
 

#define DEFAULT_FONT   "Sans Bold 10"
 

#define MAX_ELEMENTS_BEFORE_SCROLLING   6
 

#define STATES   7
 

#define STATE_HIDDEN   (STATES - 1)
 


Documentazione delle ridefinizioni di tipo (typedefs)

typedef struct _TitleRadioButton TitleRadioButton
 

typedef struct _TitleButton TitleButton
 

typedef struct _TitleButtonData TitleButtonData
 

typedef struct _MenuTmpl MenuTmpl
 

typedef struct _WMThemeInfo WMThemeInfo
 


Documentazione dei tipi enumerati

enum ThemeType
 

Valori dei tipi enumerati:
DECORATION_THEMES 
KEYBINDING_THEMES 

anonymous enum
 

Valori dei tipi enumerati:
TITLE 
MENU 
SHADE 
HIDE 
MAXIMIZE 
CLOSE 
END 

anonymous enum
 

Valori dei tipi enumerati:
WM_THEME_NAME_COLUMN 
WM_N_COLUMNS 


Documentazione delle funzioni

static void run_dialog BrainMcsPlugin mcs_plugin  )  [static]
 

static gboolean glib22_str_has_suffix const gchar *  str,
const gchar *  suffix
[static]
 

static void sensitive_cb GtkWidget *  widget,
gpointer  user_data
[static]
 

static void cb_layout_destroy_button GtkWidget *  widget,
gpointer  user_data
[static]
 

static void cb_layout_value_changed GtkWidget *  widget,
gpointer  user_data
[static]
 

static GtkWidget* create_layout_buttons gchar *  layout,
gpointer  user_data
[static]
 

static GtkWidget* create_option_menu_box MenuTmpl  template[],
guint  size,
gchar *  display_label,
gchar *  value,
GCallback  handler,
gpointer  user_data
[static]
 

static void theme_info_free WMThemeInfo info  )  [static]
 

static WMThemeInfo* find_theme_info_by_name const gchar *  theme_name,
GList *  theme_list
[static]
 

static gboolean parserc const gchar *  filename,
gboolean *  set_layout,
gboolean *  set_align,
gboolean *  set_font
[static]
 

static GList* update_theme_dir const gchar *  theme_dir,
GList *  theme_list
[static]
 

static GList* themes_common_list_add_dir const char *  dirname,
GList *  theme_list
[static]
 

static GList* theme_common_init GList *  theme_list  )  [static]
 

< La path di installazione

static gboolean dialog_update_from_theme BrainWMDialog itf,
const gchar *  theme_name,
GList *  theme_list
[static]
 

static void decoration_selection_changed GtkTreeSelection *  selection,
gpointer  data
[static]
 

static void keybinding_selection_changed GtkTreeSelection *  selection,
gpointer  data
[static]
 

static GList* read_themes GList *  theme_list,
GtkWidget *  treeview,
GtkWidget *  swindow,
ThemeType  type,
gchar *  current_value
[static]
 

static gint sort_func GtkTreeModel *  model,
GtkTreeIter *  a,
GtkTreeIter *  b,
gpointer  user_data
[static]
 

static void cb_click_to_focus_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_focus_new_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_raise_on_focus_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_raise_delay_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_raise_on_click_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_snap_to_border_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_snap_to_windows_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_snap_width_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_wrap_resistance_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_wrap_workspaces_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_wrap_windows_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_box_move_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_box_resize_changed GtkWidget *  dialog,
gpointer  user_data
[static]
 

static void cb_dblclick_action_value_changed GtkWidget *  widget,
gpointer  user_data
[static]
 

static void cb_title_align_value_changed GtkWidget *  widget,
gpointer  user_data
[static]
 

static void font_selection_ok GtkWidget *  w,
gpointer  user_data
[static]
 

static void show_font_selection GtkWidget *  widget,
gpointer  user_data
[static]
 

static void cb_dialog_response GtkWidget *  dialog,
gint  response_id
[static]
 

BrainWMDialog* create_dialog BrainMcsPlugin mcs_plugin  ) 
 

static void setup_dialog BrainWMDialog itf  )  [static]
 

static int create_channel BrainMcsPlugin mcs_plugin  )  [static]
 

BrainMcsPluginInitResult mcs_plugin_init BrainMcsPlugin mcs_plugin  ) 
 

Da fare:
Assegnare una icona al pannello di configurazione dei tipi MIME


Documentazione delle variabili

TitleButton title_buttons[]
 

Valore iniziale:

 {
    {N_("Title"), '|'},
    {N_("Menu"), 'O'},
    {N_("Shade"), 'S'},
    {N_("Hide"), 'H'},
    {N_("Maximize"), 'M'},
    {N_("Close"), 'C'}
}

MenuTmpl dbl_click_values[]
 

Valore iniziale:

 {
    {N_("Shade window"), "shade"},
    {N_("Hide window"), "hide"},
    {N_("Maximize window"), "maximize"},
    {N_("Nothing"), "none"},
    {NULL, NULL}
}

MenuTmpl title_align_values[]
 

Valore iniziale:

 {
    {N_("Left"), "left"},
    {N_("Center"), "center"},
    {N_("Right"), "right"},
    {NULL, NULL}
}

gboolean setting_model = FALSE [static]
 

gboolean is_running = FALSE [static]
 

gchar* current_theme = NULL [static]
 

gchar* current_key_theme = NULL [static]
 

gchar* current_layout = NULL [static]
 

gchar* current_font = NULL [static]
 

gchar* dbl_click_action = NULL [static]
 

gchar* title_align = NULL [static]
 

gboolean click_to_focus = TRUE [static]
 

gboolean focus_new = TRUE [static]
 

gboolean focus_raise = FALSE [static]
 

gboolean raise_on_click = TRUE [static]
 

gboolean snap_to_border = TRUE [static]
 

gboolean snap_to_windows = FALSE [static]
 

gboolean wrap_workspaces = FALSE [static]
 

gboolean wrap_windows = TRUE [static]
 

gboolean box_move = FALSE [static]
 

gboolean box_resize = FALSE [static]
 

int raise_delay [static]
 

int snap_width [static]
 

int wrap_resistance [static]
 

TitleRadioButton title_radio_buttons[END] [static]
 

GList* decoration_theme_list = NULL [static]
 

GList* keybinding_theme_list = NULL [static]
 

BrainWMDialog* Dialog
 


Generato il Sun Apr 16 01:36:45 2006 per BrainTop da  doxygen 1.4.6