Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
- /* Metacity Theme Rendering */
- /*
- * Copyright (C) 2001 Havoc Pennington
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
- #ifndef META_THEME_H
- #define META_THEME_H
- #include <glib.h>
- #include <meta/common.h>
- typedef enum
- {
- META_BUTTON_STATE_NORMAL,
- META_BUTTON_STATE_PRESSED,
- META_BUTTON_STATE_PRELIGHT,
- META_BUTTON_STATE_LAST
- } MetaButtonState;
- typedef enum
- {
- /* Ordered so that background is drawn first */
- META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND,
- META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND,
- META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND,
- META_BUTTON_TYPE_LEFT_SINGLE_BACKGROUND,
- META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND,
- META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND,
- META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND,
- META_BUTTON_TYPE_RIGHT_SINGLE_BACKGROUND,
- META_BUTTON_TYPE_CLOSE,
- META_BUTTON_TYPE_MAXIMIZE,
- META_BUTTON_TYPE_MINIMIZE,
- META_BUTTON_TYPE_MENU,
- META_BUTTON_TYPE_SHADE,
- META_BUTTON_TYPE_ABOVE,
- META_BUTTON_TYPE_STICK,
- META_BUTTON_TYPE_UNSHADE,
- META_BUTTON_TYPE_UNABOVE,
- META_BUTTON_TYPE_UNSTICK,
- META_BUTTON_TYPE_LAST
- } MetaButtonType;
- /**
- * MetaTheme:
- *
- */
- typedef struct _MetaTheme MetaTheme;
- MetaTheme* meta_theme_get_current (void);
- void meta_theme_set_current (const char *name,
- gboolean force_reload);
- MetaTheme* meta_theme_new (void);
- void meta_theme_free (MetaTheme *theme);
- gboolean meta_theme_validate (MetaTheme *theme,
- GError **error);
- MetaTheme* meta_theme_load (const char *theme_name,
- GError **err);
- void meta_theme_draw_frame (MetaTheme *theme,
- GtkWidget *widget,
- cairo_t *cr,
- MetaFrameType type,
- MetaFrameFlags flags,
- int client_width,
- int client_height,
- PangoLayout *title_layout,
- int text_height,
- const MetaButtonLayout *button_layout,
- MetaButtonState button_states[META_BUTTON_TYPE_LAST],
- GdkPixbuf *mini_icon,
- GdkPixbuf *icon);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement