From 09721cdade56cdc1460edee25c17257387c837f9 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 24 Jul 2013 01:47:46 +0200 Subject: Move include files and remove old libmate and libmateui folders --- configure.ac | 2 - docs/reference/mate-desktop/Makefile.am | 2 +- .../mate-desktop/mate-desktop-sections.txt | 22 +- docs/reference/mate-desktop/mate-desktop.types | 8 +- libmate-desktop/Makefile.am | 11 +- libmate-desktop/libmate/Makefile.am | 6 - libmate-desktop/libmate/mate-desktop-item.h | 312 --------------------- libmate-desktop/libmate/mate-desktop-utils.h | 51 ---- libmate-desktop/libmateui/Makefile.am | 10 - libmate-desktop/libmateui/mate-bg-crossfade.h | 89 ------ libmate-desktop/libmateui/mate-bg.h | 182 ------------ libmate-desktop/libmateui/mate-desktop-thumbnail.h | 114 -------- libmate-desktop/libmateui/mate-rr-config.h | 131 --------- libmate-desktop/libmateui/mate-rr-labeler.h | 53 ---- libmate-desktop/libmateui/mate-rr.h | 177 ------------ libmate-desktop/mate-bg-crossfade.c | 4 +- libmate-desktop/mate-bg-crossfade.h | 89 ++++++ libmate-desktop/mate-bg.c | 4 +- libmate-desktop/mate-bg.h | 182 ++++++++++++ libmate-desktop/mate-desktop-item.c | 4 +- libmate-desktop/mate-desktop-item.h | 312 +++++++++++++++++++++ libmate-desktop/mate-desktop-thumbnail.c | 2 +- libmate-desktop/mate-desktop-thumbnail.h | 114 ++++++++ libmate-desktop/mate-desktop-utils.c | 2 +- libmate-desktop/mate-desktop-utils.h | 51 ++++ libmate-desktop/mate-rr-config.c | 2 +- libmate-desktop/mate-rr-config.h | 131 +++++++++ libmate-desktop/mate-rr-labeler.c | 2 +- libmate-desktop/mate-rr-labeler.h | 53 ++++ libmate-desktop/mate-rr.c | 2 +- libmate-desktop/mate-rr.h | 177 ++++++++++++ libmate-desktop/mate-thumbnail-pixbuf-utils.c | 2 +- libmate-desktop/test-ditem.c | 2 +- 33 files changed, 1148 insertions(+), 1157 deletions(-) delete mode 100644 libmate-desktop/libmate/Makefile.am delete mode 100644 libmate-desktop/libmate/mate-desktop-item.h delete mode 100644 libmate-desktop/libmate/mate-desktop-utils.h delete mode 100644 libmate-desktop/libmateui/Makefile.am delete mode 100644 libmate-desktop/libmateui/mate-bg-crossfade.h delete mode 100644 libmate-desktop/libmateui/mate-bg.h delete mode 100644 libmate-desktop/libmateui/mate-desktop-thumbnail.h delete mode 100644 libmate-desktop/libmateui/mate-rr-config.h delete mode 100644 libmate-desktop/libmateui/mate-rr-labeler.h delete mode 100644 libmate-desktop/libmateui/mate-rr.h create mode 100644 libmate-desktop/mate-bg-crossfade.h create mode 100644 libmate-desktop/mate-bg.h create mode 100644 libmate-desktop/mate-desktop-item.h create mode 100644 libmate-desktop/mate-desktop-thumbnail.h create mode 100644 libmate-desktop/mate-desktop-utils.h create mode 100644 libmate-desktop/mate-rr-config.h create mode 100644 libmate-desktop/mate-rr-labeler.h create mode 100644 libmate-desktop/mate-rr.h diff --git a/configure.ac b/configure.ac index efca89e..e430d41 100644 --- a/configure.ac +++ b/configure.ac @@ -292,8 +292,6 @@ Makefile mate-about/Makefile mate-about/mate-about.desktop.in libmate-desktop/Makefile -libmate-desktop/libmate/Makefile -libmate-desktop/libmateui/Makefile libmate-desktop/mate-desktop-2.0.pc libmate-desktop/mate-desktop-2.0-uninstalled.pc docs/Makefile diff --git a/docs/reference/mate-desktop/Makefile.am b/docs/reference/mate-desktop/Makefile.am index d6a8fdc..7ebb5ba 100644 --- a/docs/reference/mate-desktop/Makefile.am +++ b/docs/reference/mate-desktop/Makefile.am @@ -42,7 +42,7 @@ FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB=$(top_srcdir)/libmate-desktop/libmate/*.h $(top_srcdir)/libmate-desktop/libmateui/*.h +HFILE_GLOB=$(top_srcdir)/libmate-desktop/*.h CFILE_GLOB=$(top_srcdir)/libmate-desktop/*.c # Header files to ignore when scanning. diff --git a/docs/reference/mate-desktop/mate-desktop-sections.txt b/docs/reference/mate-desktop/mate-desktop-sections.txt index 09e2b94..ceb33ec 100644 --- a/docs/reference/mate-desktop/mate-desktop-sections.txt +++ b/docs/reference/mate-desktop/mate-desktop-sections.txt @@ -1,5 +1,5 @@
-libmateui/mate-bg.h +mate-bg.h mate-bg MateBG MateBG @@ -35,7 +35,7 @@ MateBGClass
-libmateui/mate-rr.h +mate-rr.h mate-rr-screen MateRRScreen @@ -55,7 +55,7 @@ mate_rr_screen_get_ranges
-libmateui/mate-rr.h +mate-rr.h mate-rr-output MateRROutput @@ -77,7 +77,7 @@ mate_rr_output_can_clone
-libmateui/mate-rr.h +mate-rr.h mate-rr-crtc MateRRCrtc @@ -93,7 +93,7 @@ mate_rr_crtc_get_rotations
-libmateui/mate-rr.h +mate-rr.h mate-rr-mode MateRRMode @@ -104,7 +104,7 @@ mate_rr_mode_get_freq
-libmateui/mate-rr-config.h +mate-rr-config.h mate-rr-config MateOutputInfo @@ -122,7 +122,7 @@ mate_rr_config_applicable
-libmateui/mate-rr-labeler.h +mate-rr-labeler.h mate-rr-labeler MateRRLabeler MateRRLabeler @@ -142,7 +142,7 @@ MateRRLabelerClass
-libmate/mate-desktop-item.h +mate-desktop-item.h mate-desktop-item MateDesktopItem MateDesktopItemType @@ -233,7 +233,7 @@ mate_desktop_item_error_quark
-libmateui/mate-thumbnail.h +mate-thumbnail.h mate-desktop-thumbnail Miscellaneous Thumbnail Functions mate_desktop_thumbnail_has_uri @@ -244,7 +244,7 @@ mate_desktop_thumbnail_scale_down_pixbuf
-libmateui/mate-thumbnail.h +mate-thumbnail.h mate-desktop-thumbnail-factory MateDesktopThumbnailFactory MateDesktopThumbnailFactory @@ -269,7 +269,7 @@ MateDesktopThumbnailFactoryClass
-libmate/mate-desktop-utils.h +mate-desktop-utils.h mate-desktop-utils Miscellaneous Functions mate_desktop_prepend_terminal_to_vector diff --git a/docs/reference/mate-desktop/mate-desktop.types b/docs/reference/mate-desktop/mate-desktop.types index ec85392..b1707bf 100644 --- a/docs/reference/mate-desktop/mate-desktop.types +++ b/docs/reference/mate-desktop/mate-desktop.types @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include mate_desktop_item_get_type mate_bg_get_type diff --git a/libmate-desktop/Makefile.am b/libmate-desktop/Makefile.am index 878303d..0c0b3e2 100644 --- a/libmate-desktop/Makefile.am +++ b/libmate-desktop/Makefile.am @@ -1,4 +1,13 @@ -SUBDIRS = libmate libmateui +libmate_desktopdir = $(includedir)/mate-desktop-2.0/ +libmate_desktop_HEADERS = \ + mate-desktop-utils.h \ + mate-desktop-item.h \ + mate-bg.h \ + mate-bg-crossfade.h \ + mate-desktop-thumbnail.h \ + mate-rr.h \ + mate-rr-config.h \ + mate-rr-labeler.h lib_LTLIBRARIES = libmate-desktop-2.la diff --git a/libmate-desktop/libmate/Makefile.am b/libmate-desktop/libmate/Makefile.am deleted file mode 100644 index 6c080f7..0000000 --- a/libmate-desktop/libmate/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -libmate_desktopdir = $(includedir)/mate-desktop-2.0/libmate -libmate_desktop_HEADERS = \ - mate-desktop-utils.h \ - mate-desktop-item.h - --include $(top_srcdir)/git.mk diff --git a/libmate-desktop/libmate/mate-desktop-item.h b/libmate-desktop/libmate/mate-desktop-item.h deleted file mode 100644 index 2f9ff9b..0000000 --- a/libmate-desktop/libmate/mate-desktop-item.h +++ /dev/null @@ -1,312 +0,0 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* mate-ditem.h - MATE Desktop File Representation - - Copyright (C) 1999, 2000 Red Hat Inc. - Copyright (C) 2001 Sid Vicious - All rights reserved. - - This file is part of the Mate Library. - - The Mate Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Mate Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Mate Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - Boston, MA 02110-1301, USA. */ -/* - @NOTATION@ - */ - -#ifndef MATE_DITEM_H -#define MATE_DITEM_H - -#include -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - MATE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not - * set */, - MATE_DESKTOP_ITEM_TYPE_OTHER /* This means it's not one of the below - strings types, and you must get the - Type attribute. */, - - /* These are the standard compliant types: */ - MATE_DESKTOP_ITEM_TYPE_APPLICATION, - MATE_DESKTOP_ITEM_TYPE_LINK, - MATE_DESKTOP_ITEM_TYPE_FSDEVICE, - MATE_DESKTOP_ITEM_TYPE_MIME_TYPE, - MATE_DESKTOP_ITEM_TYPE_DIRECTORY, - MATE_DESKTOP_ITEM_TYPE_SERVICE, - MATE_DESKTOP_ITEM_TYPE_SERVICE_TYPE -} MateDesktopItemType; - -typedef enum { - MATE_DESKTOP_ITEM_UNCHANGED = 0, - MATE_DESKTOP_ITEM_CHANGED = 1, - MATE_DESKTOP_ITEM_DISAPPEARED = 2 -} MateDesktopItemStatus; - -#define MATE_TYPE_DESKTOP_ITEM (mate_desktop_item_get_type ()) -GType mate_desktop_item_get_type (void); - -typedef struct _MateDesktopItem MateDesktopItem; - -/* standard */ -#define MATE_DESKTOP_ITEM_ENCODING "Encoding" /* string */ -#define MATE_DESKTOP_ITEM_VERSION "Version" /* numeric */ -#define MATE_DESKTOP_ITEM_NAME "Name" /* localestring */ -#define MATE_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */ -#define MATE_DESKTOP_ITEM_TYPE "Type" /* string */ -#define MATE_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */ -#define MATE_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */ -#define MATE_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */ -#define MATE_DESKTOP_ITEM_COMMENT "Comment" /* localestring */ -#define MATE_DESKTOP_ITEM_EXEC "Exec" /* string */ -#define MATE_DESKTOP_ITEM_ACTIONS "Actions" /* strings */ -#define MATE_DESKTOP_ITEM_ICON "Icon" /* string */ -#define MATE_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */ -#define MATE_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */ -#define MATE_DESKTOP_ITEM_PATH "Path" /* string */ -#define MATE_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */ -#define MATE_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */ -#define MATE_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */ -#define MATE_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */ -#define MATE_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */ -#define MATE_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */ -#define MATE_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */ -#define MATE_DESKTOP_ITEM_DEV "Dev" /* string */ -#define MATE_DESKTOP_ITEM_FS_TYPE "FSType" /* string */ -#define MATE_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */ -#define MATE_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */ -#define MATE_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */ -#define MATE_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */ -#define MATE_DESKTOP_ITEM_URL "URL" /* string */ -#define MATE_DESKTOP_ITEM_DOC_PATH "X-MATE-DocPath" /* string */ - -/* The vfolder proposal */ -#define MATE_DESKTOP_ITEM_CATEGORIES "Categories" /* string */ -#define MATE_DESKTOP_ITEM_ONLY_SHOW_IN "OnlyShowIn" /* string */ - -typedef enum { - /* Use the TryExec field to determine if this should be loaded */ - MATE_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS = 1<<0, - MATE_DESKTOP_ITEM_LOAD_NO_TRANSLATIONS = 1<<1 -} MateDesktopItemLoadFlags; - -typedef enum { - /* Never launch more instances even if the app can only - * handle one file and we have passed many */ - MATE_DESKTOP_ITEM_LAUNCH_ONLY_ONE = 1<<0, - /* Use current directory instead of home directory */ - MATE_DESKTOP_ITEM_LAUNCH_USE_CURRENT_DIR = 1<<1, - /* Append the list of URIs to the command if no Exec - * parameter is specified, instead of launching the - * app without parameters. */ - MATE_DESKTOP_ITEM_LAUNCH_APPEND_URIS = 1<<2, - /* Same as above but instead append local paths */ - MATE_DESKTOP_ITEM_LAUNCH_APPEND_PATHS = 1<<3, - /* Don't automatically reap child process. */ - MATE_DESKTOP_ITEM_LAUNCH_DO_NOT_REAP_CHILD = 1<<4 -} MateDesktopItemLaunchFlags; - -typedef enum { - /* Don't check the kde directories */ - MATE_DESKTOP_ITEM_ICON_NO_KDE = 1<<0 -} MateDesktopItemIconFlags; - -typedef enum { - MATE_DESKTOP_ITEM_ERROR_NO_FILENAME /* No filename set or given on save */, - MATE_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING /* Unknown encoding of the file */, - MATE_DESKTOP_ITEM_ERROR_CANNOT_OPEN /* Cannot open file */, - MATE_DESKTOP_ITEM_ERROR_NO_EXEC_STRING /* Cannot launch due to no execute string */, - MATE_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING /* Cannot launch due to bad execute string */, - MATE_DESKTOP_ITEM_ERROR_NO_URL /* No URL on a url entry*/, - MATE_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE /* Not a launchable type of item */, - MATE_DESKTOP_ITEM_ERROR_INVALID_TYPE /* Not of type application/x-mate-app-info */ -} MateDesktopItemError; - -/* Note that functions can also return the G_FILE_ERROR_* errors */ - -#define MATE_DESKTOP_ITEM_ERROR mate_desktop_item_error_quark () -GQuark mate_desktop_item_error_quark (void); - -/* Returned item from new*() and copy() methods have a refcount of 1 */ -MateDesktopItem * mate_desktop_item_new (void); -MateDesktopItem * mate_desktop_item_new_from_file (const char *file, - MateDesktopItemLoadFlags flags, - GError **error); -MateDesktopItem * mate_desktop_item_new_from_uri (const char *uri, - MateDesktopItemLoadFlags flags, - GError **error); -MateDesktopItem * mate_desktop_item_new_from_string (const char *uri, - const char *string, - gssize length, - MateDesktopItemLoadFlags flags, - GError **error); -MateDesktopItem * mate_desktop_item_new_from_basename (const char *basename, - MateDesktopItemLoadFlags flags, - GError **error); -MateDesktopItem * mate_desktop_item_copy (const MateDesktopItem *item); - -/* if under is NULL save in original location */ -gboolean mate_desktop_item_save (MateDesktopItem *item, - const char *under, - gboolean force, - GError **error); -MateDesktopItem * mate_desktop_item_ref (MateDesktopItem *item); -void mate_desktop_item_unref (MateDesktopItem *item); -int mate_desktop_item_launch (const MateDesktopItem *item, - GList *file_list, - MateDesktopItemLaunchFlags flags, - GError **error); -int mate_desktop_item_launch_with_env (const MateDesktopItem *item, - GList *file_list, - MateDesktopItemLaunchFlags flags, - char **envp, - GError **error); - -int mate_desktop_item_launch_on_screen (const MateDesktopItem *item, - GList *file_list, - MateDesktopItemLaunchFlags flags, - GdkScreen *screen, - int workspace, - GError **error); - -/* A list of files or urls dropped onto an icon */ -int mate_desktop_item_drop_uri_list (const MateDesktopItem *item, - const char *uri_list, - MateDesktopItemLaunchFlags flags, - GError **error); - -int mate_desktop_item_drop_uri_list_with_env (const MateDesktopItem *item, - const char *uri_list, - MateDesktopItemLaunchFlags flags, - char **envp, - GError **error); - -gboolean mate_desktop_item_exists (const MateDesktopItem *item); - -MateDesktopItemType mate_desktop_item_get_entry_type (const MateDesktopItem *item); -/* You could also just use the set_string on the TYPE argument */ -void mate_desktop_item_set_entry_type (MateDesktopItem *item, - MateDesktopItemType type); - -/* Get current location on disk */ -const char * mate_desktop_item_get_location (const MateDesktopItem *item); -void mate_desktop_item_set_location (MateDesktopItem *item, - const char *location); -void mate_desktop_item_set_location_file (MateDesktopItem *item, - const char *file); -MateDesktopItemStatus mate_desktop_item_get_file_status (const MateDesktopItem *item); - -/* - * Get the icon, this is not as simple as getting the Icon attr as it actually tries to find - * it and returns %NULL if it can't - */ -char * mate_desktop_item_get_icon (const MateDesktopItem *item, - GtkIconTheme *icon_theme); - -char * mate_desktop_item_find_icon (GtkIconTheme *icon_theme, - const char *icon, - /* size is only a suggestion */ - int desired_size, - int flags); - - -/* - * Reading/Writing different sections, NULL is the standard section - */ -gboolean mate_desktop_item_attr_exists (const MateDesktopItem *item, - const char *attr); - -/* - * String type - */ -const char * mate_desktop_item_get_string (const MateDesktopItem *item, - const char *attr); - -void mate_desktop_item_set_string (MateDesktopItem *item, - const char *attr, - const char *value); - -const char * mate_desktop_item_get_attr_locale (const MateDesktopItem *item, - const char *attr); - -/* - * LocaleString type - */ -const char * mate_desktop_item_get_localestring (const MateDesktopItem *item, - const char *attr); -const char * mate_desktop_item_get_localestring_lang (const MateDesktopItem *item, - const char *attr, - const char *language); -/* use g_list_free only */ -GList * mate_desktop_item_get_languages (const MateDesktopItem *item, - const char *attr); - -void mate_desktop_item_set_localestring (MateDesktopItem *item, - const char *attr, - const char *value); -void mate_desktop_item_set_localestring_lang (MateDesktopItem *item, - const char *attr, - const char *language, - const char *value); -void mate_desktop_item_clear_localestring(MateDesktopItem *item, - const char *attr); - -/* - * Strings, Regexps types - */ - -/* use mate_desktop_item_free_string_list */ -char ** mate_desktop_item_get_strings (const MateDesktopItem *item, - const char *attr); - -void mate_desktop_item_set_strings (MateDesktopItem *item, - const char *attr, - char **strings); - -/* - * Boolean type - */ -gboolean mate_desktop_item_get_boolean (const MateDesktopItem *item, - const char *attr); - -void mate_desktop_item_set_boolean (MateDesktopItem *item, - const char *attr, - gboolean value); - -/* - * Xserver time of user action that caused the application launch to start. - */ -void mate_desktop_item_set_launch_time (MateDesktopItem *item, - guint32 timestamp); - -/* - * Clearing attributes - */ -#define mate_desktop_item_clear_attr(item,attr) \ - mate_desktop_item_set_string(item,attr,NULL) -void mate_desktop_item_clear_section (MateDesktopItem *item, - const char *section); - -#ifdef __cplusplus -} -#endif - -#endif /* MATE_DITEM_H */ diff --git a/libmate-desktop/libmate/mate-desktop-utils.h b/libmate-desktop/libmate/mate-desktop-utils.h deleted file mode 100644 index f2e659f..0000000 --- a/libmate-desktop/libmate/mate-desktop-utils.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* mate-ditem.h - Utilities for the MATE Desktop - - Copyright (C) 1998 Tom Tromey - All rights reserved. - - This file is part of the Mate Library. - - The Mate Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Mate Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Mate Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - Boston, MA 02110-1301, USA. */ -/* - @NOTATION@ - */ - -#ifndef MATE_DESKTOP_UTILS_H -#define MATE_DESKTOP_UTILS_H - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error mate-desktop-utils is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-desktop-utils.h -#endif - -#include -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* prepend the terminal command to a vector */ -void mate_desktop_prepend_terminal_to_vector (int *argc, char ***argv); - -#ifdef __cplusplus -} -#endif - -#endif /* MATE_DITEM_H */ diff --git a/libmate-desktop/libmateui/Makefile.am b/libmate-desktop/libmateui/Makefile.am deleted file mode 100644 index 413fee0..0000000 --- a/libmate-desktop/libmateui/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -libmateui_desktopdir = $(includedir)/mate-desktop-2.0/libmateui -libmateui_desktop_HEADERS = \ - mate-bg.h \ - mate-bg-crossfade.h \ - mate-desktop-thumbnail.h \ - mate-rr.h \ - mate-rr-config.h \ - mate-rr-labeler.h - --include $(top_srcdir)/git.mk diff --git a/libmate-desktop/libmateui/mate-bg-crossfade.h b/libmate-desktop/libmateui/mate-bg-crossfade.h deleted file mode 100644 index 28c1e28..0000000 --- a/libmate-desktop/libmateui/mate-bg-crossfade.h +++ /dev/null @@ -1,89 +0,0 @@ -/* mate-bg-crossfade.h - fade window background between two pixmaps - - Copyright 2008, Red Hat, Inc. - - This file is part of the Mate Library. - - The Mate Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Mate Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Mate Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - Floor, Boston, MA 02110-1301 US. - - Author: Ray Strode -*/ - -#ifndef __MATE_BG_CROSSFADE_H__ -#define __MATE_BG_CROSSFADE_H__ - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error MateBGCrossfade is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg-crossfade.h -#endif - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define MATE_TYPE_BG_CROSSFADE (mate_bg_crossfade_get_type ()) -#define MATE_BG_CROSSFADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfade)) -#define MATE_BG_CROSSFADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass)) -#define MATE_IS_BG_CROSSFADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG_CROSSFADE)) -#define MATE_IS_BG_CROSSFADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG_CROSSFADE)) -#define MATE_BG_CROSSFADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass)) - -typedef struct _MateBGCrossfadePrivate MateBGCrossfadePrivate; -typedef struct _MateBGCrossfade MateBGCrossfade; -typedef struct _MateBGCrossfadeClass MateBGCrossfadeClass; - -struct _MateBGCrossfade -{ - GObject parent_object; - - MateBGCrossfadePrivate *priv; -}; - -struct _MateBGCrossfadeClass -{ - GObjectClass parent_class; - - void (* finished) (MateBGCrossfade *fade, GdkWindow *window); -}; - -GType mate_bg_crossfade_get_type (void); -MateBGCrossfade *mate_bg_crossfade_new (int width, int height); - - -#if GTK_CHECK_VERSION(3, 0, 0) -gboolean mate_bg_crossfade_set_start_surface (MateBGCrossfade *fade, - cairo_surface_t *surface); -gboolean mate_bg_crossfade_set_end_surface (MateBGCrossfade *fade, - cairo_surface_t *surface); -#else -gboolean mate_bg_crossfade_set_start_pixmap (MateBGCrossfade *fade, - GdkPixmap *pixmap); -gboolean mate_bg_crossfade_set_end_pixmap (MateBGCrossfade *fade, - GdkPixmap *pixmap); -#endif - -void mate_bg_crossfade_start (MateBGCrossfade *fade, - GdkWindow *window); -gboolean mate_bg_crossfade_is_started (MateBGCrossfade *fade); -void mate_bg_crossfade_stop (MateBGCrossfade *fade); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libmate-desktop/libmateui/mate-bg.h b/libmate-desktop/libmateui/mate-bg.h deleted file mode 100644 index d909ec4..0000000 --- a/libmate-desktop/libmateui/mate-bg.h +++ /dev/null @@ -1,182 +0,0 @@ -/* mate-bg.h - - - Copyright (C) 2007 Red Hat, Inc. - Copyright (C) 2012 Jasmine Hassan - - This file is part of the Mate Library. - - The Mate Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Mate Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Mate Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - Boston, MA 02110-1301, USA. - - Authors: Soren Sandmann - Jasmine Hassan -*/ - -#ifndef __MATE_BG_H__ -#define __MATE_BG_H__ - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error MateBG is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg.h -#endif - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define MATE_TYPE_BG (mate_bg_get_type ()) -#define MATE_BG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG, MateBG)) -#define MATE_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG, MateBGClass)) -#define MATE_IS_BG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG)) -#define MATE_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG)) -#define MATE_BG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG, MateBGClass)) - -#define MATE_BG_SCHEMA "org.mate.background" - -/* whether to draw the desktop bg */ -#define MATE_BG_KEY_DRAW_BACKGROUND "draw-background" - -/* whether Caja or mate-settings-daemon draw the desktop */ -#define MATE_BG_KEY_SHOW_DESKTOP "show-desktop-icons" - -/* whether to fade when changing background (By Caja/m-s-d) */ -#define MATE_BG_KEY_BACKGROUND_FADE "background-fade" - -#define MATE_BG_KEY_PRIMARY_COLOR "primary-color" -#define MATE_BG_KEY_SECONDARY_COLOR "secondary-color" -#define MATE_BG_KEY_COLOR_TYPE "color-shading-type" -#define MATE_BG_KEY_PICTURE_PLACEMENT "picture-options" -#define MATE_BG_KEY_PICTURE_OPACITY "picture-opacity" -#define MATE_BG_KEY_PICTURE_FILENAME "picture-filename" - -typedef struct _MateBG MateBG; -typedef struct _MateBGClass MateBGClass; - -typedef enum { - MATE_BG_COLOR_SOLID, - MATE_BG_COLOR_H_GRADIENT, - MATE_BG_COLOR_V_GRADIENT -} MateBGColorType; - -typedef enum { - MATE_BG_PLACEMENT_TILED, - MATE_BG_PLACEMENT_ZOOMED, - MATE_BG_PLACEMENT_CENTERED, - MATE_BG_PLACEMENT_SCALED, - MATE_BG_PLACEMENT_FILL_SCREEN, - MATE_BG_PLACEMENT_SPANNED -} MateBGPlacement; - -GType mate_bg_get_type (void); -MateBG * mate_bg_new (void); -void mate_bg_load_from_preferences (MateBG *bg); -void mate_bg_load_from_system_preferences (MateBG *bg); -void mate_bg_load_from_system_gsettings (MateBG *bg, - GSettings *settings, - gboolean reset_apply); -void mate_bg_load_from_gsettings (MateBG *bg, - GSettings *settings); -void mate_bg_save_to_preferences (MateBG *bg); -void mate_bg_save_to_gsettings (MateBG *bg, - GSettings *settings); - -/* Setters */ -void mate_bg_set_filename (MateBG *bg, - const char *filename); -void mate_bg_set_placement (MateBG *bg, - MateBGPlacement placement); -void mate_bg_set_color (MateBG *bg, - MateBGColorType type, - GdkColor *primary, - GdkColor *secondary); -void mate_bg_set_draw_background (MateBG *bg, - gboolean draw_background); -/* Getters */ -gboolean mate_bg_get_draw_background (MateBG *bg); -MateBGPlacement mate_bg_get_placement (MateBG *bg); -void mate_bg_get_color (MateBG *bg, - MateBGColorType *type, - GdkColor *primary, - GdkColor *secondary); -const gchar * mate_bg_get_filename (MateBG *bg); - -/* Drawing and thumbnailing */ -void mate_bg_draw (MateBG *bg, - GdkPixbuf *dest, - GdkScreen *screen, - gboolean is_root); - -#if GTK_CHECK_VERSION(3, 0, 0) -cairo_surface_t *mate_bg_create_surface (MateBG *bg, -#else -GdkPixmap *mate_bg_create_pixmap (MateBG *bg, -#endif - GdkWindow *window, - int width, - int height, - gboolean root); - -gboolean mate_bg_get_image_size (MateBG *bg, - MateDesktopThumbnailFactory *factory, - int best_width, - int best_height, - int *width, - int *height); -GdkPixbuf * mate_bg_create_thumbnail (MateBG *bg, - MateDesktopThumbnailFactory *factory, - GdkScreen *screen, - int dest_width, - int dest_height); -gboolean mate_bg_is_dark (MateBG *bg, - int dest_width, - int dest_height); -gboolean mate_bg_has_multiple_sizes (MateBG *bg); -gboolean mate_bg_changes_with_time (MateBG *bg); -GdkPixbuf * mate_bg_create_frame_thumbnail (MateBG *bg, - MateDesktopThumbnailFactory *factory, - GdkScreen *screen, - int dest_width, - int dest_height, - int frame_num); - -/* Set a surface as root - not a MateBG method. At some point - * if we decide to stabilize the API then we may want to make - * these object methods, drop mate_bg_create_surface, etc. - */ -#if GTK_CHECK_VERSION(3, 0, 0) -void mate_bg_set_surface_as_root (GdkScreen *screen, - cairo_surface_t *surface); -MateBGCrossfade *mate_bg_set_surface_as_root_with_crossfade (GdkScreen *screen, - cairo_surface_t *surface); -cairo_surface_t *mate_bg_get_surface_from_root (GdkScreen *screen); - -#else /* GTK_CHECK_VERSION(3, 0, 0) */ - -void mate_bg_set_pixmap_as_root (GdkScreen *screen, - GdkPixmap *pixmap); -MateBGCrossfade *mate_bg_set_pixmap_as_root_with_crossfade (GdkScreen *screen, - GdkPixmap *pixmap); -GdkPixmap *mate_bg_get_pixmap_from_root (GdkScreen *screen); -#endif /* GTK_CHECK_VERSION(3, 0, 0) */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libmate-desktop/libmateui/mate-desktop-thumbnail.h b/libmate-desktop/libmateui/mate-desktop-thumbnail.h deleted file mode 100644 index 775348b..0000000 --- a/libmate-desktop/libmateui/mate-desktop-thumbnail.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * mate-thumbnail.h: Utilities for handling thumbnails - * - * Copyright (C) 2002 Red Hat, Inc. - * - * This file is part of the Mate Library. - * - * The Mate Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Mate Library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Mate Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Alexander Larsson - */ - -#ifndef MATE_DESKTOP_THUMBNAIL_H -#define MATE_DESKTOP_THUMBNAIL_H - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error MateDesktopThumbnail is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-desktop-thumbnail.h -#endif - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL, - MATE_DESKTOP_THUMBNAIL_SIZE_LARGE -} MateDesktopThumbnailSize; - -#define MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY (mate_desktop_thumbnail_factory_get_type ()) -#define MATE_DESKTOP_THUMBNAIL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY, MateDesktopThumbnailFactory)) -#define MATE_DESKTOP_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY, MateDesktopThumbnailFactoryClass)) -#define MATE_DESKTOP_IS_THUMBNAIL_FACTORY(obj) (G_TYPE_INSTANCE_CHECK_TYPE ((obj), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY)) -#define MATE_DESKTOP_IS_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CLASS_CHECK_CLASS_TYPE ((klass), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY)) - -typedef struct _MateDesktopThumbnailFactory MateDesktopThumbnailFactory; -typedef struct _MateDesktopThumbnailFactoryClass MateDesktopThumbnailFactoryClass; -typedef struct _MateDesktopThumbnailFactoryPrivate MateDesktopThumbnailFactoryPrivate; - -struct _MateDesktopThumbnailFactory { - GObject parent; - - MateDesktopThumbnailFactoryPrivate *priv; -}; - -struct _MateDesktopThumbnailFactoryClass { - GObjectClass parent; -}; - -GType mate_desktop_thumbnail_factory_get_type (void); -MateDesktopThumbnailFactory *mate_desktop_thumbnail_factory_new (MateDesktopThumbnailSize size); - -char * mate_desktop_thumbnail_factory_lookup (MateDesktopThumbnailFactory *factory, - const char *uri, - time_t mtime); - -gboolean mate_desktop_thumbnail_factory_has_valid_failed_thumbnail (MateDesktopThumbnailFactory *factory, - const char *uri, - time_t mtime); -gboolean mate_desktop_thumbnail_factory_can_thumbnail (MateDesktopThumbnailFactory *factory, - const char *uri, - const char *mime_type, - time_t mtime); -GdkPixbuf * mate_desktop_thumbnail_factory_generate_thumbnail (MateDesktopThumbnailFactory *factory, - const char *uri, - const char *mime_type); -void mate_desktop_thumbnail_factory_save_thumbnail (MateDesktopThumbnailFactory *factory, - GdkPixbuf *thumbnail, - const char *uri, - time_t original_mtime); -void mate_desktop_thumbnail_factory_create_failed_thumbnail (MateDesktopThumbnailFactory *factory, - const char *uri, - time_t mtime); - - -/* Thumbnailing utils: */ -gboolean mate_desktop_thumbnail_has_uri (GdkPixbuf *pixbuf, - const char *uri); -gboolean mate_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf, - const char *uri, - time_t mtime); -char * mate_desktop_thumbnail_md5 (const char *uri); -char * mate_desktop_thumbnail_path_for_uri (const char *uri, - MateDesktopThumbnailSize size); - - -/* Pixbuf utils */ - -GdkPixbuf *mate_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf *pixbuf, - int dest_width, - int dest_height); - -#ifdef __cplusplus -} -#endif - -#endif /* MATE_DESKTOP_THUMBNAIL_H */ diff --git a/libmate-desktop/libmateui/mate-rr-config.h b/libmate-desktop/libmateui/mate-rr-config.h deleted file mode 100644 index 039da01..0000000 --- a/libmate-desktop/libmateui/mate-rr-config.h +++ /dev/null @@ -1,131 +0,0 @@ -/* mate-rr-config.h - * - * Copyright 2007, 2008, Red Hat, Inc. - * - * This file is part of the Mate Library. - * - * The Mate Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Mate Library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Mate Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Soren Sandmann - */ -#ifndef MATE_RR_CONFIG_H -#define MATE_RR_CONFIG_H - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error mate-rr-config.h is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-rr-config.h -#endif - -#include -#include - -typedef struct MateOutputInfo MateOutputInfo; -typedef struct MateRRConfig MateRRConfig; - -/* FIXME: - * - * This structure is a Frankenstein monster where all of the fields - * are generated by the system, but some of them can be changed by - * the client. - */ - -struct MateOutputInfo -{ - char * name; - - gboolean on; /* whether there is a CRTC assigned to this output (i.e. a signal is being sent to it) */ - int width; - int height; - int rate; - int x; - int y; - MateRRRotation rotation; - - gboolean connected; /* whether the output is physically connected to a monitor */ - char vendor[4]; - guint product; - guint serial; - double aspect; - int pref_width; - int pref_height; - char * display_name; - gboolean primary; - - gpointer user_data; -}; - -struct MateRRConfig -{ - /* "clone" means that at least two outputs are at (0, 0) offset and they - * have the same width/height. Those outputs are of course connected and on - * (i.e. they have a CRTC assigned). - */ - gboolean clone; - - MateOutputInfo ** outputs; -}; - -MateRRConfig *mate_rr_config_new_current (MateRRScreen *screen); -MateRRConfig *mate_rr_config_new_stored (MateRRScreen *screen, - GError **error); -void mate_rr_config_free (MateRRConfig *configuration); -gboolean mate_rr_config_match (MateRRConfig *config1, - MateRRConfig *config2); -gboolean mate_rr_config_equal (MateRRConfig *config1, - MateRRConfig *config2); -gboolean mate_rr_config_save (MateRRConfig *configuration, - GError **error); -void mate_rr_config_sanitize (MateRRConfig *configuration); - -#ifndef MATE_DISABLE_DEPRECATED -gboolean mate_rr_config_apply (MateRRConfig *configuration, - MateRRScreen *screen, - GError **error); -#endif - -gboolean mate_rr_config_apply_with_time (MateRRConfig *configuration, - MateRRScreen *screen, - guint32 timestamp, - GError **error); - -#ifndef MATE_DISABLE_DEPRECATED -gboolean mate_rr_config_apply_stored (MateRRScreen *screen, - GError **error); -#endif - -#ifndef MATE_DISABLE_DEPRECATED -gboolean mate_rr_config_apply_from_filename (MateRRScreen *screen, - const char *filename, - GError **error); -#endif - -gboolean mate_rr_config_apply_from_filename_with_time (MateRRScreen *screen, - const char *filename, - guint32 timestamp, - GError **error); - -gboolean mate_rr_config_applicable (MateRRConfig *configuration, - MateRRScreen *screen, - GError **error); - -char *mate_rr_config_get_backup_filename (void); -char *mate_rr_config_get_intended_filename (void); - -/* A utility function that isn't really in the spirit of this file, but I don't - * don't know a better place for it. - */ -MateRRMode **mate_rr_create_clone_modes (MateRRScreen *screen); - -#endif diff --git a/libmate-desktop/libmateui/mate-rr-labeler.h b/libmate-desktop/libmateui/mate-rr-labeler.h deleted file mode 100644 index 1b18ae7..0000000 --- a/libmate-desktop/libmateui/mate-rr-labeler.h +++ /dev/null @@ -1,53 +0,0 @@ -/* mate-rr-labeler.h - Utility to label monitors to identify them - * while they are being configured. - * - * Copyright 2008, Novell, Inc. - * - * This file is part of the Mate Library. - * - * The Mate Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Mate Library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Mate Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Federico Mena-Quintero - */ - -#ifndef MATE_RR_LABELER_H -#define MATE_RR_LABELER_H - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error MateRR is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including materr.h -#endif - -#include - -#define MATE_TYPE_RR_LABELER (mate_rr_labeler_get_type ()) -#define MATE_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_RR_LABELER, MateRRLabeler)) -#define MATE_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_RR_LABELER, MateRRLabelerClass)) -#define MATE_IS_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_RR_LABELER)) -#define MATE_IS_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_RR_LABELER)) -#define MATE_RR_LABELER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_RR_LABELER, MateRRLabelerClass)) - -typedef struct _MateRRLabeler MateRRLabeler; -typedef struct _MateRRLabelerClass MateRRLabelerClass; - -GType mate_rr_labeler_get_type (void); - -MateRRLabeler *mate_rr_labeler_new (MateRRConfig *config); - -void mate_rr_labeler_hide (MateRRLabeler *labeler); - -void mate_rr_labeler_get_color_for_output (MateRRLabeler *labeler, MateOutputInfo *output, GdkColor *color_out); - -#endif diff --git a/libmate-desktop/libmateui/mate-rr.h b/libmate-desktop/libmateui/mate-rr.h deleted file mode 100644 index 3559560..0000000 --- a/libmate-desktop/libmateui/mate-rr.h +++ /dev/null @@ -1,177 +0,0 @@ -/* randrwrap.h - * - * Copyright 2007, 2008, Red Hat, Inc. - * - * This file is part of the Mate Library. - * - * The Mate Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Mate Library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Mate Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Soren Sandmann - */ -#ifndef RANDR_WRAP_H -#define RANDR_WRAP_H - -#ifndef MATE_DESKTOP_USE_UNSTABLE_API -#error MateRR is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including materr.h -#endif - -#include -#include - -typedef struct MateRRScreen MateRRScreen; -typedef struct MateRROutput MateRROutput; -typedef struct MateRRCrtc MateRRCrtc; -typedef struct MateRRMode MateRRMode; - -typedef void (* MateRRScreenChanged) (MateRRScreen *screen, gpointer data); - -typedef enum -{ - MATE_RR_ROTATION_0 = (1 << 0), - MATE_RR_ROTATION_90 = (1 << 1), - MATE_RR_ROTATION_180 = (1 << 2), - MATE_RR_ROTATION_270 = (1 << 3), - MATE_RR_REFLECT_X = (1 << 4), - MATE_RR_REFLECT_Y = (1 << 5) -} MateRRRotation; - -/* Error codes */ - -#define MATE_RR_ERROR (mate_rr_error_quark ()) - -GQuark mate_rr_error_quark (void); - -typedef enum { - MATE_RR_ERROR_UNKNOWN, /* generic "fail" */ - MATE_RR_ERROR_NO_RANDR_EXTENSION, /* RANDR extension is not present */ - MATE_RR_ERROR_RANDR_ERROR, /* generic/undescribed error from the underlying XRR API */ - MATE_RR_ERROR_BOUNDS_ERROR, /* requested bounds of a CRTC are outside the maximum size */ - MATE_RR_ERROR_CRTC_ASSIGNMENT, /* could not assign CRTCs to outputs */ - MATE_RR_ERROR_NO_MATCHING_CONFIG, /* none of the saved configurations matched the current configuration */ -} MateRRError; - -#define MATE_RR_CONNECTOR_TYPE_PANEL "Panel" /* This is a laptop's built-in LCD */ - -/* MateRRScreen */ -MateRRScreen * mate_rr_screen_new (GdkScreen *screen, - MateRRScreenChanged callback, - gpointer data, - GError **error); -void mate_rr_screen_destroy (MateRRScreen *screen); -MateRROutput **mate_rr_screen_list_outputs (MateRRScreen *screen); -MateRRCrtc ** mate_rr_screen_list_crtcs (MateRRScreen *screen); -MateRRMode ** mate_rr_screen_list_modes (MateRRScreen *screen); -MateRRMode ** mate_rr_screen_list_clone_modes (MateRRScreen *screen); -void mate_rr_screen_set_size (MateRRScreen *screen, - int width, - int height, - int mm_width, - int mm_height); -MateRRCrtc * mate_rr_screen_get_crtc_by_id (MateRRScreen *screen, - guint32 id); -gboolean mate_rr_screen_refresh (MateRRScreen *screen, - GError **error); -MateRROutput * mate_rr_screen_get_output_by_id (MateRRScreen *screen, - guint32 id); -MateRROutput * mate_rr_screen_get_output_by_name (MateRRScreen *screen, - const char *name); -void mate_rr_screen_get_ranges (MateRRScreen *screen, - int *min_width, - int *max_width, - int *min_height, - int *max_height); -void mate_rr_screen_get_timestamps (MateRRScreen *screen, - guint32 *change_timestamp_ret, - guint32 *config_timestamp_ret); - -void mate_rr_screen_set_primary_output (MateRRScreen *screen, - MateRROutput *output); - -/* MateRROutput */ -guint32 mate_rr_output_get_id (MateRROutput *output); -const char * mate_rr_output_get_name (MateRROutput *output); -gboolean mate_rr_output_is_connected (MateRROutput *output); -int mate_rr_output_get_size_inches (MateRROutput *output); -int mate_rr_output_get_width_mm (MateRROutput *outout); -int mate_rr_output_get_height_mm (MateRROutput *output); -const guint8 * mate_rr_output_get_edid_data (MateRROutput *output); -MateRRCrtc ** mate_rr_output_get_possible_crtcs (MateRROutput *output); -MateRRMode * mate_rr_output_get_current_mode (MateRROutput *output); -MateRRCrtc * mate_rr_output_get_crtc (MateRROutput *output); -const char * mate_rr_output_get_connector_type (MateRROutput *output); -gboolean mate_rr_output_is_laptop (MateRROutput *output); -void mate_rr_output_get_position (MateRROutput *output, - int *x, - int *y); -gboolean mate_rr_output_can_clone (MateRROutput *output, - MateRROutput *clone); -MateRRMode ** mate_rr_output_list_modes (MateRROutput *output); -MateRRMode * mate_rr_output_get_preferred_mode (MateRROutput *output); -gboolean mate_rr_output_supports_mode (MateRROutput *output, - MateRRMode *mode); -gboolean mate_rr_output_get_is_primary (MateRROutput *output); - -/* MateRRMode */ -guint32 mate_rr_mode_get_id (MateRRMode *mode); -guint mate_rr_mode_get_width (MateRRMode *mode); -guint mate_rr_mode_get_height (MateRRMode *mode); -int mate_rr_mode_get_freq (MateRRMode *mode); - -/* MateRRCrtc */ -guint32 mate_rr_crtc_get_id (MateRRCrtc *crtc); - -#ifndef MATE_DISABLE_DEPRECATED -gboolean mate_rr_crtc_set_config (MateRRCrtc *crtc, - int x, - int y, - MateRRMode *mode, - MateRRRotation rotation, - MateRROutput **outputs, - int n_outputs, - GError **error); -#endif - -gboolean mate_rr_crtc_set_config_with_time (MateRRCrtc *crtc, - guint32 timestamp, - int x, - int y, - MateRRMode *mode, - MateRRRotation rotation, - MateRROutput **outputs, - int n_outputs, - GError **error); -gboolean mate_rr_crtc_can_drive_output (MateRRCrtc *crtc, - MateRROutput *output); -MateRRMode * mate_rr_crtc_get_current_mode (MateRRCrtc *crtc); -void mate_rr_crtc_get_position (MateRRCrtc *crtc, - int *x, - int *y); -MateRRRotation mate_rr_crtc_get_current_rotation (MateRRCrtc *crtc); -MateRRRotation mate_rr_crtc_get_rotations (MateRRCrtc *crtc); -gboolean mate_rr_crtc_supports_rotation (MateRRCrtc *crtc, - MateRRRotation rotation); - -gboolean mate_rr_crtc_get_gamma (MateRRCrtc *crtc, - int *size, - unsigned short **red, - unsigned short **green, - unsigned short **blue); -void mate_rr_crtc_set_gamma (MateRRCrtc *crtc, - int size, - unsigned short *red, - unsigned short *green, - unsigned short *blue); -#endif diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c index 3c870f1..3242004 100644 --- a/libmate-desktop/mate-bg-crossfade.c +++ b/libmate-desktop/mate-bg-crossfade.c @@ -35,8 +35,8 @@ #include #define MATE_DESKTOP_USE_UNSTABLE_API -#include -#include "libmateui/mate-bg-crossfade.h" +#include +#include "mate-bg-crossfade.h" #if !GTK_CHECK_VERSION(3, 0, 0) #define cairo_surface_t GdkPixmap diff --git a/libmate-desktop/mate-bg-crossfade.h b/libmate-desktop/mate-bg-crossfade.h new file mode 100644 index 0000000..28c1e28 --- /dev/null +++ b/libmate-desktop/mate-bg-crossfade.h @@ -0,0 +1,89 @@ +/* mate-bg-crossfade.h - fade window background between two pixmaps + + Copyright 2008, Red Hat, Inc. + + This file is part of the Mate Library. + + The Mate Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Mate Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + Floor, Boston, MA 02110-1301 US. + + Author: Ray Strode +*/ + +#ifndef __MATE_BG_CROSSFADE_H__ +#define __MATE_BG_CROSSFADE_H__ + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error MateBGCrossfade is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg-crossfade.h +#endif + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define MATE_TYPE_BG_CROSSFADE (mate_bg_crossfade_get_type ()) +#define MATE_BG_CROSSFADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfade)) +#define MATE_BG_CROSSFADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass)) +#define MATE_IS_BG_CROSSFADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG_CROSSFADE)) +#define MATE_IS_BG_CROSSFADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG_CROSSFADE)) +#define MATE_BG_CROSSFADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass)) + +typedef struct _MateBGCrossfadePrivate MateBGCrossfadePrivate; +typedef struct _MateBGCrossfade MateBGCrossfade; +typedef struct _MateBGCrossfadeClass MateBGCrossfadeClass; + +struct _MateBGCrossfade +{ + GObject parent_object; + + MateBGCrossfadePrivate *priv; +}; + +struct _MateBGCrossfadeClass +{ + GObjectClass parent_class; + + void (* finished) (MateBGCrossfade *fade, GdkWindow *window); +}; + +GType mate_bg_crossfade_get_type (void); +MateBGCrossfade *mate_bg_crossfade_new (int width, int height); + + +#if GTK_CHECK_VERSION(3, 0, 0) +gboolean mate_bg_crossfade_set_start_surface (MateBGCrossfade *fade, + cairo_surface_t *surface); +gboolean mate_bg_crossfade_set_end_surface (MateBGCrossfade *fade, + cairo_surface_t *surface); +#else +gboolean mate_bg_crossfade_set_start_pixmap (MateBGCrossfade *fade, + GdkPixmap *pixmap); +gboolean mate_bg_crossfade_set_end_pixmap (MateBGCrossfade *fade, + GdkPixmap *pixmap); +#endif + +void mate_bg_crossfade_start (MateBGCrossfade *fade, + GdkWindow *window); +gboolean mate_bg_crossfade_is_started (MateBGCrossfade *fade); +void mate_bg_crossfade_stop (MateBGCrossfade *fade); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index b2cfcbf..83efcd3 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -44,8 +44,8 @@ Authors: Soren Sandmann #include #define MATE_DESKTOP_USE_UNSTABLE_API -#include -#include +#include +#include #if GTK_CHECK_VERSION (3, 0, 0) # include diff --git a/libmate-desktop/mate-bg.h b/libmate-desktop/mate-bg.h new file mode 100644 index 0000000..ed8b7af --- /dev/null +++ b/libmate-desktop/mate-bg.h @@ -0,0 +1,182 @@ +/* mate-bg.h - + + Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2012 Jasmine Hassan + + This file is part of the Mate Library. + + The Mate Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Mate Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. + + Authors: Soren Sandmann + Jasmine Hassan +*/ + +#ifndef __MATE_BG_H__ +#define __MATE_BG_H__ + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error MateBG is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg.h +#endif + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define MATE_TYPE_BG (mate_bg_get_type ()) +#define MATE_BG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG, MateBG)) +#define MATE_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG, MateBGClass)) +#define MATE_IS_BG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG)) +#define MATE_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG)) +#define MATE_BG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG, MateBGClass)) + +#define MATE_BG_SCHEMA "org.mate.background" + +/* whether to draw the desktop bg */ +#define MATE_BG_KEY_DRAW_BACKGROUND "draw-background" + +/* whether Caja or mate-settings-daemon draw the desktop */ +#define MATE_BG_KEY_SHOW_DESKTOP "show-desktop-icons" + +/* whether to fade when changing background (By Caja/m-s-d) */ +#define MATE_BG_KEY_BACKGROUND_FADE "background-fade" + +#define MATE_BG_KEY_PRIMARY_COLOR "primary-color" +#define MATE_BG_KEY_SECONDARY_COLOR "secondary-color" +#define MATE_BG_KEY_COLOR_TYPE "color-shading-type" +#define MATE_BG_KEY_PICTURE_PLACEMENT "picture-options" +#define MATE_BG_KEY_PICTURE_OPACITY "picture-opacity" +#define MATE_BG_KEY_PICTURE_FILENAME "picture-filename" + +typedef struct _MateBG MateBG; +typedef struct _MateBGClass MateBGClass; + +typedef enum { + MATE_BG_COLOR_SOLID, + MATE_BG_COLOR_H_GRADIENT, + MATE_BG_COLOR_V_GRADIENT +} MateBGColorType; + +typedef enum { + MATE_BG_PLACEMENT_TILED, + MATE_BG_PLACEMENT_ZOOMED, + MATE_BG_PLACEMENT_CENTERED, + MATE_BG_PLACEMENT_SCALED, + MATE_BG_PLACEMENT_FILL_SCREEN, + MATE_BG_PLACEMENT_SPANNED +} MateBGPlacement; + +GType mate_bg_get_type (void); +MateBG * mate_bg_new (void); +void mate_bg_load_from_preferences (MateBG *bg); +void mate_bg_load_from_system_preferences (MateBG *bg); +void mate_bg_load_from_system_gsettings (MateBG *bg, + GSettings *settings, + gboolean reset_apply); +void mate_bg_load_from_gsettings (MateBG *bg, + GSettings *settings); +void mate_bg_save_to_preferences (MateBG *bg); +void mate_bg_save_to_gsettings (MateBG *bg, + GSettings *settings); + +/* Setters */ +void mate_bg_set_filename (MateBG *bg, + const char *filename); +void mate_bg_set_placement (MateBG *bg, + MateBGPlacement placement); +void mate_bg_set_color (MateBG *bg, + MateBGColorType type, + GdkColor *primary, + GdkColor *secondary); +void mate_bg_set_draw_background (MateBG *bg, + gboolean draw_background); +/* Getters */ +gboolean mate_bg_get_draw_background (MateBG *bg); +MateBGPlacement mate_bg_get_placement (MateBG *bg); +void mate_bg_get_color (MateBG *bg, + MateBGColorType *type, + GdkColor *primary, + GdkColor *secondary); +const gchar * mate_bg_get_filename (MateBG *bg); + +/* Drawing and thumbnailing */ +void mate_bg_draw (MateBG *bg, + GdkPixbuf *dest, + GdkScreen *screen, + gboolean is_root); + +#if GTK_CHECK_VERSION(3, 0, 0) +cairo_surface_t *mate_bg_create_surface (MateBG *bg, +#else +GdkPixmap *mate_bg_create_pixmap (MateBG *bg, +#endif + GdkWindow *window, + int width, + int height, + gboolean root); + +gboolean mate_bg_get_image_size (MateBG *bg, + MateDesktopThumbnailFactory *factory, + int best_width, + int best_height, + int *width, + int *height); +GdkPixbuf * mate_bg_create_thumbnail (MateBG *bg, + MateDesktopThumbnailFactory *factory, + GdkScreen *screen, + int dest_width, + int dest_height); +gboolean mate_bg_is_dark (MateBG *bg, + int dest_width, + int dest_height); +gboolean mate_bg_has_multiple_sizes (MateBG *bg); +gboolean mate_bg_changes_with_time (MateBG *bg); +GdkPixbuf * mate_bg_create_frame_thumbnail (MateBG *bg, + MateDesktopThumbnailFactory *factory, + GdkScreen *screen, + int dest_width, + int dest_height, + int frame_num); + +/* Set a surface as root - not a MateBG method. At some point + * if we decide to stabilize the API then we may want to make + * these object methods, drop mate_bg_create_surface, etc. + */ +#if GTK_CHECK_VERSION(3, 0, 0) +void mate_bg_set_surface_as_root (GdkScreen *screen, + cairo_surface_t *surface); +MateBGCrossfade *mate_bg_set_surface_as_root_with_crossfade (GdkScreen *screen, + cairo_surface_t *surface); +cairo_surface_t *mate_bg_get_surface_from_root (GdkScreen *screen); + +#else /* GTK_CHECK_VERSION(3, 0, 0) */ + +void mate_bg_set_pixmap_as_root (GdkScreen *screen, + GdkPixmap *pixmap); +MateBGCrossfade *mate_bg_set_pixmap_as_root_with_crossfade (GdkScreen *screen, + GdkPixmap *pixmap); +GdkPixmap *mate_bg_get_pixmap_from_root (GdkScreen *screen); +#endif /* GTK_CHECK_VERSION(3, 0, 0) */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libmate-desktop/mate-desktop-item.c b/libmate-desktop/mate-desktop-item.c index c1304be..eb004d9 100644 --- a/libmate-desktop/mate-desktop-item.c +++ b/libmate-desktop/mate-desktop-item.c @@ -56,8 +56,8 @@ #define MATE_DESKTOP_USE_UNSTABLE_API #undef MATE_DISABLE_DEPRECATED -#include -#include +#include +#include #include "private.h" diff --git a/libmate-desktop/mate-desktop-item.h b/libmate-desktop/mate-desktop-item.h new file mode 100644 index 0000000..2f9ff9b --- /dev/null +++ b/libmate-desktop/mate-desktop-item.h @@ -0,0 +1,312 @@ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* mate-ditem.h - MATE Desktop File Representation + + Copyright (C) 1999, 2000 Red Hat Inc. + Copyright (C) 2001 Sid Vicious + All rights reserved. + + This file is part of the Mate Library. + + The Mate Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Mate Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ +/* + @NOTATION@ + */ + +#ifndef MATE_DITEM_H +#define MATE_DITEM_H + +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + MATE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not + * set */, + MATE_DESKTOP_ITEM_TYPE_OTHER /* This means it's not one of the below + strings types, and you must get the + Type attribute. */, + + /* These are the standard compliant types: */ + MATE_DESKTOP_ITEM_TYPE_APPLICATION, + MATE_DESKTOP_ITEM_TYPE_LINK, + MATE_DESKTOP_ITEM_TYPE_FSDEVICE, + MATE_DESKTOP_ITEM_TYPE_MIME_TYPE, + MATE_DESKTOP_ITEM_TYPE_DIRECTORY, + MATE_DESKTOP_ITEM_TYPE_SERVICE, + MATE_DESKTOP_ITEM_TYPE_SERVICE_TYPE +} MateDesktopItemType; + +typedef enum { + MATE_DESKTOP_ITEM_UNCHANGED = 0, + MATE_DESKTOP_ITEM_CHANGED = 1, + MATE_DESKTOP_ITEM_DISAPPEARED = 2 +} MateDesktopItemStatus; + +#define MATE_TYPE_DESKTOP_ITEM (mate_desktop_item_get_type ()) +GType mate_desktop_item_get_type (void); + +typedef struct _MateDesktopItem MateDesktopItem; + +/* standard */ +#define MATE_DESKTOP_ITEM_ENCODING "Encoding" /* string */ +#define MATE_DESKTOP_ITEM_VERSION "Version" /* numeric */ +#define MATE_DESKTOP_ITEM_NAME "Name" /* localestring */ +#define MATE_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */ +#define MATE_DESKTOP_ITEM_TYPE "Type" /* string */ +#define MATE_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */ +#define MATE_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */ +#define MATE_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */ +#define MATE_DESKTOP_ITEM_COMMENT "Comment" /* localestring */ +#define MATE_DESKTOP_ITEM_EXEC "Exec" /* string */ +#define MATE_DESKTOP_ITEM_ACTIONS "Actions" /* strings */ +#define MATE_DESKTOP_ITEM_ICON "Icon" /* string */ +#define MATE_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */ +#define MATE_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */ +#define MATE_DESKTOP_ITEM_PATH "Path" /* string */ +#define MATE_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */ +#define MATE_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */ +#define MATE_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */ +#define MATE_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */ +#define MATE_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */ +#define MATE_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */ +#define MATE_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */ +#define MATE_DESKTOP_ITEM_DEV "Dev" /* string */ +#define MATE_DESKTOP_ITEM_FS_TYPE "FSType" /* string */ +#define MATE_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */ +#define MATE_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */ +#define MATE_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */ +#define MATE_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */ +#define MATE_DESKTOP_ITEM_URL "URL" /* string */ +#define MATE_DESKTOP_ITEM_DOC_PATH "X-MATE-DocPath" /* string */ + +/* The vfolder proposal */ +#define MATE_DESKTOP_ITEM_CATEGORIES "Categories" /* string */ +#define MATE_DESKTOP_ITEM_ONLY_SHOW_IN "OnlyShowIn" /* string */ + +typedef enum { + /* Use the TryExec field to determine if this should be loaded */ + MATE_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS = 1<<0, + MATE_DESKTOP_ITEM_LOAD_NO_TRANSLATIONS = 1<<1 +} MateDesktopItemLoadFlags; + +typedef enum { + /* Never launch more instances even if the app can only + * handle one file and we have passed many */ + MATE_DESKTOP_ITEM_LAUNCH_ONLY_ONE = 1<<0, + /* Use current directory instead of home directory */ + MATE_DESKTOP_ITEM_LAUNCH_USE_CURRENT_DIR = 1<<1, + /* Append the list of URIs to the command if no Exec + * parameter is specified, instead of launching the + * app without parameters. */ + MATE_DESKTOP_ITEM_LAUNCH_APPEND_URIS = 1<<2, + /* Same as above but instead append local paths */ + MATE_DESKTOP_ITEM_LAUNCH_APPEND_PATHS = 1<<3, + /* Don't automatically reap child process. */ + MATE_DESKTOP_ITEM_LAUNCH_DO_NOT_REAP_CHILD = 1<<4 +} MateDesktopItemLaunchFlags; + +typedef enum { + /* Don't check the kde directories */ + MATE_DESKTOP_ITEM_ICON_NO_KDE = 1<<0 +} MateDesktopItemIconFlags; + +typedef enum { + MATE_DESKTOP_ITEM_ERROR_NO_FILENAME /* No filename set or given on save */, + MATE_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING /* Unknown encoding of the file */, + MATE_DESKTOP_ITEM_ERROR_CANNOT_OPEN /* Cannot open file */, + MATE_DESKTOP_ITEM_ERROR_NO_EXEC_STRING /* Cannot launch due to no execute string */, + MATE_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING /* Cannot launch due to bad execute string */, + MATE_DESKTOP_ITEM_ERROR_NO_URL /* No URL on a url entry*/, + MATE_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE /* Not a launchable type of item */, + MATE_DESKTOP_ITEM_ERROR_INVALID_TYPE /* Not of type application/x-mate-app-info */ +} MateDesktopItemError; + +/* Note that functions can also return the G_FILE_ERROR_* errors */ + +#define MATE_DESKTOP_ITEM_ERROR mate_desktop_item_error_quark () +GQuark mate_desktop_item_error_quark (void); + +/* Returned item from new*() and copy() methods have a refcount of 1 */ +MateDesktopItem * mate_desktop_item_new (void); +MateDesktopItem * mate_desktop_item_new_from_file (const char *file, + MateDesktopItemLoadFlags flags, + GError **error); +MateDesktopItem * mate_desktop_item_new_from_uri (const char *uri, + MateDesktopItemLoadFlags flags, + GError **error); +MateDesktopItem * mate_desktop_item_new_from_string (const char *uri, + const char *string, + gssize length, + MateDesktopItemLoadFlags flags, + GError **error); +MateDesktopItem * mate_desktop_item_new_from_basename (const char *basename, + MateDesktopItemLoadFlags flags, + GError **error); +MateDesktopItem * mate_desktop_item_copy (const MateDesktopItem *item); + +/* if under is NULL save in original location */ +gboolean mate_desktop_item_save (MateDesktopItem *item, + const char *under, + gboolean force, + GError **error); +MateDesktopItem * mate_desktop_item_ref (MateDesktopItem *item); +void mate_desktop_item_unref (MateDesktopItem *item); +int mate_desktop_item_launch (const MateDesktopItem *item, + GList *file_list, + MateDesktopItemLaunchFlags flags, + GError **error); +int mate_desktop_item_launch_with_env (const MateDesktopItem *item, + GList *file_list, + MateDesktopItemLaunchFlags flags, + char **envp, + GError **error); + +int mate_desktop_item_launch_on_screen (const MateDesktopItem *item, + GList *file_list, + MateDesktopItemLaunchFlags flags, + GdkScreen *screen, + int workspace, + GError **error); + +/* A list of files or urls dropped onto an icon */ +int mate_desktop_item_drop_uri_list (const MateDesktopItem *item, + const char *uri_list, + MateDesktopItemLaunchFlags flags, + GError **error); + +int mate_desktop_item_drop_uri_list_with_env (const MateDesktopItem *item, + const char *uri_list, + MateDesktopItemLaunchFlags flags, + char **envp, + GError **error); + +gboolean mate_desktop_item_exists (const MateDesktopItem *item); + +MateDesktopItemType mate_desktop_item_get_entry_type (const MateDesktopItem *item); +/* You could also just use the set_string on the TYPE argument */ +void mate_desktop_item_set_entry_type (MateDesktopItem *item, + MateDesktopItemType type); + +/* Get current location on disk */ +const char * mate_desktop_item_get_location (const MateDesktopItem *item); +void mate_desktop_item_set_location (MateDesktopItem *item, + const char *location); +void mate_desktop_item_set_location_file (MateDesktopItem *item, + const char *file); +MateDesktopItemStatus mate_desktop_item_get_file_status (const MateDesktopItem *item); + +/* + * Get the icon, this is not as simple as getting the Icon attr as it actually tries to find + * it and returns %NULL if it can't + */ +char * mate_desktop_item_get_icon (const MateDesktopItem *item, + GtkIconTheme *icon_theme); + +char * mate_desktop_item_find_icon (GtkIconTheme *icon_theme, + const char *icon, + /* size is only a suggestion */ + int desired_size, + int flags); + + +/* + * Reading/Writing different sections, NULL is the standard section + */ +gboolean mate_desktop_item_attr_exists (const MateDesktopItem *item, + const char *attr); + +/* + * String type + */ +const char * mate_desktop_item_get_string (const MateDesktopItem *item, + const char *attr); + +void mate_desktop_item_set_string (MateDesktopItem *item, + const char *attr, + const char *value); + +const char * mate_desktop_item_get_attr_locale (const MateDesktopItem *item, + const char *attr); + +/* + * LocaleString type + */ +const char * mate_desktop_item_get_localestring (const MateDesktopItem *item, + const char *attr); +const char * mate_desktop_item_get_localestring_lang (const MateDesktopItem *item, + const char *attr, + const char *language); +/* use g_list_free only */ +GList * mate_desktop_item_get_languages (const MateDesktopItem *item, + const char *attr); + +void mate_desktop_item_set_localestring (MateDesktopItem *item, + const char *attr, + const char *value); +void mate_desktop_item_set_localestring_lang (MateDesktopItem *item, + const char *attr, + const char *language, + const char *value); +void mate_desktop_item_clear_localestring(MateDesktopItem *item, + const char *attr); + +/* + * Strings, Regexps types + */ + +/* use mate_desktop_item_free_string_list */ +char ** mate_desktop_item_get_strings (const MateDesktopItem *item, + const char *attr); + +void mate_desktop_item_set_strings (MateDesktopItem *item, + const char *attr, + char **strings); + +/* + * Boolean type + */ +gboolean mate_desktop_item_get_boolean (const MateDesktopItem *item, + const char *attr); + +void mate_desktop_item_set_boolean (MateDesktopItem *item, + const char *attr, + gboolean value); + +/* + * Xserver time of user action that caused the application launch to start. + */ +void mate_desktop_item_set_launch_time (MateDesktopItem *item, + guint32 timestamp); + +/* + * Clearing attributes + */ +#define mate_desktop_item_clear_attr(item,attr) \ + mate_desktop_item_set_string(item,attr,NULL) +void mate_desktop_item_clear_section (MateDesktopItem *item, + const char *section); + +#ifdef __cplusplus +} +#endif + +#endif /* MATE_DITEM_H */ diff --git a/libmate-desktop/mate-desktop-thumbnail.c b/libmate-desktop/mate-desktop-thumbnail.c index 45b29a1..734334b 100644 --- a/libmate-desktop/mate-desktop-thumbnail.c +++ b/libmate-desktop/mate-desktop-thumbnail.c @@ -41,7 +41,7 @@ #include #define MATE_DESKTOP_USE_UNSTABLE_API -#include "libmateui/mate-desktop-thumbnail.h" +#include "mate-desktop-thumbnail.h" #include #include diff --git a/libmate-desktop/mate-desktop-thumbnail.h b/libmate-desktop/mate-desktop-thumbnail.h new file mode 100644 index 0000000..775348b --- /dev/null +++ b/libmate-desktop/mate-desktop-thumbnail.h @@ -0,0 +1,114 @@ +/* + * mate-thumbnail.h: Utilities for handling thumbnails + * + * Copyright (C) 2002 Red Hat, Inc. + * + * This file is part of the Mate Library. + * + * The Mate Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Mate Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Mate Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Alexander Larsson + */ + +#ifndef MATE_DESKTOP_THUMBNAIL_H +#define MATE_DESKTOP_THUMBNAIL_H + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error MateDesktopThumbnail is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-desktop-thumbnail.h +#endif + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL, + MATE_DESKTOP_THUMBNAIL_SIZE_LARGE +} MateDesktopThumbnailSize; + +#define MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY (mate_desktop_thumbnail_factory_get_type ()) +#define MATE_DESKTOP_THUMBNAIL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY, MateDesktopThumbnailFactory)) +#define MATE_DESKTOP_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY, MateDesktopThumbnailFactoryClass)) +#define MATE_DESKTOP_IS_THUMBNAIL_FACTORY(obj) (G_TYPE_INSTANCE_CHECK_TYPE ((obj), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY)) +#define MATE_DESKTOP_IS_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CLASS_CHECK_CLASS_TYPE ((klass), MATE_DESKTOP_TYPE_THUMBNAIL_FACTORY)) + +typedef struct _MateDesktopThumbnailFactory MateDesktopThumbnailFactory; +typedef struct _MateDesktopThumbnailFactoryClass MateDesktopThumbnailFactoryClass; +typedef struct _MateDesktopThumbnailFactoryPrivate MateDesktopThumbnailFactoryPrivate; + +struct _MateDesktopThumbnailFactory { + GObject parent; + + MateDesktopThumbnailFactoryPrivate *priv; +}; + +struct _MateDesktopThumbnailFactoryClass { + GObjectClass parent; +}; + +GType mate_desktop_thumbnail_factory_get_type (void); +MateDesktopThumbnailFactory *mate_desktop_thumbnail_factory_new (MateDesktopThumbnailSize size); + +char * mate_desktop_thumbnail_factory_lookup (MateDesktopThumbnailFactory *factory, + const char *uri, + time_t mtime); + +gboolean mate_desktop_thumbnail_factory_has_valid_failed_thumbnail (MateDesktopThumbnailFactory *factory, + const char *uri, + time_t mtime); +gboolean mate_desktop_thumbnail_factory_can_thumbnail (MateDesktopThumbnailFactory *factory, + const char *uri, + const char *mime_type, + time_t mtime); +GdkPixbuf * mate_desktop_thumbnail_factory_generate_thumbnail (MateDesktopThumbnailFactory *factory, + const char *uri, + const char *mime_type); +void mate_desktop_thumbnail_factory_save_thumbnail (MateDesktopThumbnailFactory *factory, + GdkPixbuf *thumbnail, + const char *uri, + time_t original_mtime); +void mate_desktop_thumbnail_factory_create_failed_thumbnail (MateDesktopThumbnailFactory *factory, + const char *uri, + time_t mtime); + + +/* Thumbnailing utils: */ +gboolean mate_desktop_thumbnail_has_uri (GdkPixbuf *pixbuf, + const char *uri); +gboolean mate_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf, + const char *uri, + time_t mtime); +char * mate_desktop_thumbnail_md5 (const char *uri); +char * mate_desktop_thumbnail_path_for_uri (const char *uri, + MateDesktopThumbnailSize size); + + +/* Pixbuf utils */ + +GdkPixbuf *mate_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf *pixbuf, + int dest_width, + int dest_height); + +#ifdef __cplusplus +} +#endif + +#endif /* MATE_DESKTOP_THUMBNAIL_H */ diff --git a/libmate-desktop/mate-desktop-utils.c b/libmate-desktop/mate-desktop-utils.c index 8b19a60..4d6d170 100644 --- a/libmate-desktop/mate-desktop-utils.c +++ b/libmate-desktop/mate-desktop-utils.c @@ -30,7 +30,7 @@ #include #define MATE_DESKTOP_USE_UNSTABLE_API -#include +#include #include "private.h" diff --git a/libmate-desktop/mate-desktop-utils.h b/libmate-desktop/mate-desktop-utils.h new file mode 100644 index 0000000..f2e659f --- /dev/null +++ b/libmate-desktop/mate-desktop-utils.h @@ -0,0 +1,51 @@ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* mate-ditem.h - Utilities for the MATE Desktop + + Copyright (C) 1998 Tom Tromey + All rights reserved. + + This file is part of the Mate Library. + + The Mate Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Mate Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ +/* + @NOTATION@ + */ + +#ifndef MATE_DESKTOP_UTILS_H +#define MATE_DESKTOP_UTILS_H + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error mate-desktop-utils is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-desktop-utils.h +#endif + +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* prepend the terminal command to a vector */ +void mate_desktop_prepend_terminal_to_vector (int *argc, char ***argv); + +#ifdef __cplusplus +} +#endif + +#endif /* MATE_DITEM_H */ diff --git a/libmate-desktop/mate-rr-config.c b/libmate-desktop/mate-rr-config.c index aa4f423..b126f46 100644 --- a/libmate-desktop/mate-rr-config.c +++ b/libmate-desktop/mate-rr-config.c @@ -35,7 +35,7 @@ #include #undef MATE_DISABLE_DEPRECATED -#include "libmateui/mate-rr-config.h" +#include "mate-rr-config.h" #include "edid.h" #include "mate-rr-private.h" diff --git a/libmate-desktop/mate-rr-config.h b/libmate-desktop/mate-rr-config.h new file mode 100644 index 0000000..71caa7f --- /dev/null +++ b/libmate-desktop/mate-rr-config.h @@ -0,0 +1,131 @@ +/* mate-rr-config.h + * + * Copyright 2007, 2008, Red Hat, Inc. + * + * This file is part of the Mate Library. + * + * The Mate Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Mate Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Mate Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Soren Sandmann + */ +#ifndef MATE_RR_CONFIG_H +#define MATE_RR_CONFIG_H + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error mate-rr-config.h is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-rr-config.h +#endif + +#include +#include + +typedef struct MateOutputInfo MateOutputInfo; +typedef struct MateRRConfig MateRRConfig; + +/* FIXME: + * + * This structure is a Frankenstein monster where all of the fields + * are generated by the system, but some of them can be changed by + * the client. + */ + +struct MateOutputInfo +{ + char * name; + + gboolean on; /* whether there is a CRTC assigned to this output (i.e. a signal is being sent to it) */ + int width; + int height; + int rate; + int x; + int y; + MateRRRotation rotation; + + gboolean connected; /* whether the output is physically connected to a monitor */ + char vendor[4]; + guint product; + guint serial; + double aspect; + int pref_width; + int pref_height; + char * display_name; + gboolean primary; + + gpointer user_data; +}; + +struct MateRRConfig +{ + /* "clone" means that at least two outputs are at (0, 0) offset and they + * have the same width/height. Those outputs are of course connected and on + * (i.e. they have a CRTC assigned). + */ + gboolean clone; + + MateOutputInfo ** outputs; +}; + +MateRRConfig *mate_rr_config_new_current (MateRRScreen *screen); +MateRRConfig *mate_rr_config_new_stored (MateRRScreen *screen, + GError **error); +void mate_rr_config_free (MateRRConfig *configuration); +gboolean mate_rr_config_match (MateRRConfig *config1, + MateRRConfig *config2); +gboolean mate_rr_config_equal (MateRRConfig *config1, + MateRRConfig *config2); +gboolean mate_rr_config_save (MateRRConfig *configuration, + GError **error); +void mate_rr_config_sanitize (MateRRConfig *configuration); + +#ifndef MATE_DISABLE_DEPRECATED +gboolean mate_rr_config_apply (MateRRConfig *configuration, + MateRRScreen *screen, + GError **error); +#endif + +gboolean mate_rr_config_apply_with_time (MateRRConfig *configuration, + MateRRScreen *screen, + guint32 timestamp, + GError **error); + +#ifndef MATE_DISABLE_DEPRECATED +gboolean mate_rr_config_apply_stored (MateRRScreen *screen, + GError **error); +#endif + +#ifndef MATE_DISABLE_DEPRECATED +gboolean mate_rr_config_apply_from_filename (MateRRScreen *screen, + const char *filename, + GError **error); +#endif + +gboolean mate_rr_config_apply_from_filename_with_time (MateRRScreen *screen, + const char *filename, + guint32 timestamp, + GError **error); + +gboolean mate_rr_config_applicable (MateRRConfig *configuration, + MateRRScreen *screen, + GError **error); + +char *mate_rr_config_get_backup_filename (void); +char *mate_rr_config_get_intended_filename (void); + +/* A utility function that isn't really in the spirit of this file, but I don't + * don't know a better place for it. + */ +MateRRMode **mate_rr_create_clone_modes (MateRRScreen *screen); + +#endif diff --git a/libmate-desktop/mate-rr-labeler.c b/libmate-desktop/mate-rr-labeler.c index 7ca57fa..2b33526 100644 --- a/libmate-desktop/mate-rr-labeler.c +++ b/libmate-desktop/mate-rr-labeler.c @@ -29,7 +29,7 @@ #include #include -#include "libmateui/mate-rr-labeler.h" +#include "mate-rr-labeler.h" #include #include diff --git a/libmate-desktop/mate-rr-labeler.h b/libmate-desktop/mate-rr-labeler.h new file mode 100644 index 0000000..e3214d5 --- /dev/null +++ b/libmate-desktop/mate-rr-labeler.h @@ -0,0 +1,53 @@ +/* mate-rr-labeler.h - Utility to label monitors to identify them + * while they are being configured. + * + * Copyright 2008, Novell, Inc. + * + * This file is part of the Mate Library. + * + * The Mate Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Mate Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Mate Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Federico Mena-Quintero + */ + +#ifndef MATE_RR_LABELER_H +#define MATE_RR_LABELER_H + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error MateRR is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including materr.h +#endif + +#include + +#define MATE_TYPE_RR_LABELER (mate_rr_labeler_get_type ()) +#define MATE_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_RR_LABELER, MateRRLabeler)) +#define MATE_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_RR_LABELER, MateRRLabelerClass)) +#define MATE_IS_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_RR_LABELER)) +#define MATE_IS_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_RR_LABELER)) +#define MATE_RR_LABELER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_RR_LABELER, MateRRLabelerClass)) + +typedef struct _MateRRLabeler MateRRLabeler; +typedef struct _MateRRLabelerClass MateRRLabelerClass; + +GType mate_rr_labeler_get_type (void); + +MateRRLabeler *mate_rr_labeler_new (MateRRConfig *config); + +void mate_rr_labeler_hide (MateRRLabeler *labeler); + +void mate_rr_labeler_get_color_for_output (MateRRLabeler *labeler, MateOutputInfo *output, GdkColor *color_out); + +#endif diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c index d61dd45..197d75b 100644 --- a/libmate-desktop/mate-rr.c +++ b/libmate-desktop/mate-rr.c @@ -38,7 +38,7 @@ #include #undef MATE_DISABLE_DEPRECATED -#include "libmateui/mate-rr.h" +#include "mate-rr.h" #include "private.h" #include "mate-rr-private.h" diff --git a/libmate-desktop/mate-rr.h b/libmate-desktop/mate-rr.h new file mode 100644 index 0000000..3559560 --- /dev/null +++ b/libmate-desktop/mate-rr.h @@ -0,0 +1,177 @@ +/* randrwrap.h + * + * Copyright 2007, 2008, Red Hat, Inc. + * + * This file is part of the Mate Library. + * + * The Mate Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Mate Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Mate Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Soren Sandmann + */ +#ifndef RANDR_WRAP_H +#define RANDR_WRAP_H + +#ifndef MATE_DESKTOP_USE_UNSTABLE_API +#error MateRR is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including materr.h +#endif + +#include +#include + +typedef struct MateRRScreen MateRRScreen; +typedef struct MateRROutput MateRROutput; +typedef struct MateRRCrtc MateRRCrtc; +typedef struct MateRRMode MateRRMode; + +typedef void (* MateRRScreenChanged) (MateRRScreen *screen, gpointer data); + +typedef enum +{ + MATE_RR_ROTATION_0 = (1 << 0), + MATE_RR_ROTATION_90 = (1 << 1), + MATE_RR_ROTATION_180 = (1 << 2), + MATE_RR_ROTATION_270 = (1 << 3), + MATE_RR_REFLECT_X = (1 << 4), + MATE_RR_REFLECT_Y = (1 << 5) +} MateRRRotation; + +/* Error codes */ + +#define MATE_RR_ERROR (mate_rr_error_quark ()) + +GQuark mate_rr_error_quark (void); + +typedef enum { + MATE_RR_ERROR_UNKNOWN, /* generic "fail" */ + MATE_RR_ERROR_NO_RANDR_EXTENSION, /* RANDR extension is not present */ + MATE_RR_ERROR_RANDR_ERROR, /* generic/undescribed error from the underlying XRR API */ + MATE_RR_ERROR_BOUNDS_ERROR, /* requested bounds of a CRTC are outside the maximum size */ + MATE_RR_ERROR_CRTC_ASSIGNMENT, /* could not assign CRTCs to outputs */ + MATE_RR_ERROR_NO_MATCHING_CONFIG, /* none of the saved configurations matched the current configuration */ +} MateRRError; + +#define MATE_RR_CONNECTOR_TYPE_PANEL "Panel" /* This is a laptop's built-in LCD */ + +/* MateRRScreen */ +MateRRScreen * mate_rr_screen_new (GdkScreen *screen, + MateRRScreenChanged callback, + gpointer data, + GError **error); +void mate_rr_screen_destroy (MateRRScreen *screen); +MateRROutput **mate_rr_screen_list_outputs (MateRRScreen *screen); +MateRRCrtc ** mate_rr_screen_list_crtcs (MateRRScreen *screen); +MateRRMode ** mate_rr_screen_list_modes (MateRRScreen *screen); +MateRRMode ** mate_rr_screen_list_clone_modes (MateRRScreen *screen); +void mate_rr_screen_set_size (MateRRScreen *screen, + int width, + int height, + int mm_width, + int mm_height); +MateRRCrtc * mate_rr_screen_get_crtc_by_id (MateRRScreen *screen, + guint32 id); +gboolean mate_rr_screen_refresh (MateRRScreen *screen, + GError **error); +MateRROutput * mate_rr_screen_get_output_by_id (MateRRScreen *screen, + guint32 id); +MateRROutput * mate_rr_screen_get_output_by_name (MateRRScreen *screen, + const char *name); +void mate_rr_screen_get_ranges (MateRRScreen *screen, + int *min_width, + int *max_width, + int *min_height, + int *max_height); +void mate_rr_screen_get_timestamps (MateRRScreen *screen, + guint32 *change_timestamp_ret, + guint32 *config_timestamp_ret); + +void mate_rr_screen_set_primary_output (MateRRScreen *screen, + MateRROutput *output); + +/* MateRROutput */ +guint32 mate_rr_output_get_id (MateRROutput *output); +const char * mate_rr_output_get_name (MateRROutput *output); +gboolean mate_rr_output_is_connected (MateRROutput *output); +int mate_rr_output_get_size_inches (MateRROutput *output); +int mate_rr_output_get_width_mm (MateRROutput *outout); +int mate_rr_output_get_height_mm (MateRROutput *output); +const guint8 * mate_rr_output_get_edid_data (MateRROutput *output); +MateRRCrtc ** mate_rr_output_get_possible_crtcs (MateRROutput *output); +MateRRMode * mate_rr_output_get_current_mode (MateRROutput *output); +MateRRCrtc * mate_rr_output_get_crtc (MateRROutput *output); +const char * mate_rr_output_get_connector_type (MateRROutput *output); +gboolean mate_rr_output_is_laptop (MateRROutput *output); +void mate_rr_output_get_position (MateRROutput *output, + int *x, + int *y); +gboolean mate_rr_output_can_clone (MateRROutput *output, + MateRROutput *clone); +MateRRMode ** mate_rr_output_list_modes (MateRROutput *output); +MateRRMode * mate_rr_output_get_preferred_mode (MateRROutput *output); +gboolean mate_rr_output_supports_mode (MateRROutput *output, + MateRRMode *mode); +gboolean mate_rr_output_get_is_primary (MateRROutput *output); + +/* MateRRMode */ +guint32 mate_rr_mode_get_id (MateRRMode *mode); +guint mate_rr_mode_get_width (MateRRMode *mode); +guint mate_rr_mode_get_height (MateRRMode *mode); +int mate_rr_mode_get_freq (MateRRMode *mode); + +/* MateRRCrtc */ +guint32 mate_rr_crtc_get_id (MateRRCrtc *crtc); + +#ifndef MATE_DISABLE_DEPRECATED +gboolean mate_rr_crtc_set_config (MateRRCrtc *crtc, + int x, + int y, + MateRRMode *mode, + MateRRRotation rotation, + MateRROutput **outputs, + int n_outputs, + GError **error); +#endif + +gboolean mate_rr_crtc_set_config_with_time (MateRRCrtc *crtc, + guint32 timestamp, + int x, + int y, + MateRRMode *mode, + MateRRRotation rotation, + MateRROutput **outputs, + int n_outputs, + GError **error); +gboolean mate_rr_crtc_can_drive_output (MateRRCrtc *crtc, + MateRROutput *output); +MateRRMode * mate_rr_crtc_get_current_mode (MateRRCrtc *crtc); +void mate_rr_crtc_get_position (MateRRCrtc *crtc, + int *x, + int *y); +MateRRRotation mate_rr_crtc_get_current_rotation (MateRRCrtc *crtc); +MateRRRotation mate_rr_crtc_get_rotations (MateRRCrtc *crtc); +gboolean mate_rr_crtc_supports_rotation (MateRRCrtc *crtc, + MateRRRotation rotation); + +gboolean mate_rr_crtc_get_gamma (MateRRCrtc *crtc, + int *size, + unsigned short **red, + unsigned short **green, + unsigned short **blue); +void mate_rr_crtc_set_gamma (MateRRCrtc *crtc, + int size, + unsigned short *red, + unsigned short *green, + unsigned short *blue); +#endif diff --git a/libmate-desktop/mate-thumbnail-pixbuf-utils.c b/libmate-desktop/mate-thumbnail-pixbuf-utils.c index 8b22239..32b6292 100644 --- a/libmate-desktop/mate-thumbnail-pixbuf-utils.c +++ b/libmate-desktop/mate-thumbnail-pixbuf-utils.c @@ -30,7 +30,7 @@ #include #define MATE_DESKTOP_USE_UNSTABLE_API -#include "libmateui/mate-desktop-thumbnail.h" +#include "mate-desktop-thumbnail.h" #define LOAD_BUFFER_SIZE 65536 diff --git a/libmate-desktop/test-ditem.c b/libmate-desktop/test-ditem.c index d17f6d7..d5cac2d 100644 --- a/libmate-desktop/test-ditem.c +++ b/libmate-desktop/test-ditem.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include -- cgit v1.2.1